~cytrogen/masto-fe

ref: 20a89f1c8eefa0f766a4650be4d2e5f1fa92ee71 masto-fe/app/javascript/flavours/glitch/reducers/media_attachments.js -rw-r--r-- 396 bytes
20a89f1c — Cytrogen [feature] Bookmark folders UI 12 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { Map as ImmutableMap } from "immutable";

import { STORE_HYDRATE } from "flavours/glitch/actions/store";

const initialState = ImmutableMap({
  accept_content_types: [],
});

export default function meta(state = initialState, action) {
  switch(action.type) {
    case STORE_HYDRATE:
      return state.merge(action.state.get("media_attachments"));
    default:
      return state;
  }
}