2017-07-10 19:00:14 -04:00
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
2017-05-08 10:49:53 -04:00
|
|
|
|
2023-05-23 11:15:17 -04:00
|
|
|
import { STORE_HYDRATE } from '../actions/store';
|
|
|
|
|
2023-11-07 18:37:58 -05:00
|
|
|
export let currentMedia = null;
|
|
|
|
|
|
|
|
export function setCurrentMedia(value) {
|
|
|
|
currentMedia = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-07-10 19:00:14 -04:00
|
|
|
const initialState = ImmutableMap({
|
2017-05-08 10:49:53 -04:00
|
|
|
accept_content_types: [],
|
|
|
|
});
|
|
|
|
|
|
|
|
export default function meta(state = initialState, action) {
|
|
|
|
switch(action.type) {
|
2017-07-09 06:16:08 -04:00
|
|
|
case STORE_HYDRATE:
|
2017-05-08 10:49:53 -04:00
|
|
|
return state.merge(action.state.get('media_attachments'));
|
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
2022-12-18 10:51:37 -05:00
|
|
|
}
|