Wip: bookmark statuses view and adder
This commit is contained in:
parent
f6bdd9b6de
commit
87490a3220
30 changed files with 616 additions and 24 deletions
|
@ -1,5 +1,9 @@
|
|||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
||||
|
||||
import {
|
||||
BOOKMARK_CATEGORY_EDITOR_ADD_REQUEST,
|
||||
BOOKMARK_CATEGORY_EDITOR_ADD_FAIL,
|
||||
} from '../actions/bookmark_categories';
|
||||
import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
|
||||
import { normalizeStatusTranslation } from '../actions/importer/normalizer';
|
||||
import {
|
||||
|
@ -111,6 +115,10 @@ export default function statuses(state = initialState, action) {
|
|||
return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], true);
|
||||
case BOOKMARK_FAIL:
|
||||
return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], false);
|
||||
case BOOKMARK_CATEGORY_EDITOR_ADD_REQUEST:
|
||||
return state.get(action.statusId) === undefined ? state : state.setIn([action.statusId, 'bookmarked'], true);
|
||||
case BOOKMARK_CATEGORY_EDITOR_ADD_FAIL:
|
||||
return state.get(action.statusId) === undefined ? state : state.setIn([action.statusId, 'bookmarked'], false);
|
||||
case UNBOOKMARK_REQUEST:
|
||||
return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], false);
|
||||
case UNBOOKMARK_FAIL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue