Include preview cards in status entity in REST API (#9120)
* Include preview cards in status entity in REST API * Display preview card in-stream * Improve in-stream display of preview cards
This commit is contained in:
@ -14,7 +14,6 @@ import relationships from './relationships';
|
||||
import settings from './settings';
|
||||
import push_notifications from './push_notifications';
|
||||
import status_lists from './status_lists';
|
||||
import cards from './cards';
|
||||
import mutes from './mutes';
|
||||
import reports from './reports';
|
||||
import contexts from './contexts';
|
||||
@ -46,7 +45,6 @@ const reducers = {
|
||||
relationships,
|
||||
settings,
|
||||
push_notifications,
|
||||
cards,
|
||||
mutes,
|
||||
reports,
|
||||
contexts,
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
STATUS_REVEAL,
|
||||
STATUS_HIDE,
|
||||
} from '../actions/statuses';
|
||||
import { STATUS_CARD_FETCH_SUCCESS } from '../actions/cards';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
@ -65,6 +66,8 @@ export default function statuses(state = initialState, action) {
|
||||
});
|
||||
case TIMELINE_DELETE:
|
||||
return deleteStatus(state, action.id, action.references);
|
||||
case STATUS_CARD_FETCH_SUCCESS:
|
||||
return state.setIn([action.id, 'card'], fromJS(action.card));
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user