Set mediaProxy objects as uploaded @ implementation

This commit is contained in:
Cássio Zen
2016-07-19 19:42:37 -03:00
parent 483fdb2643
commit 9f220181b3
4 changed files with 10 additions and 21 deletions

View File

@ -1,6 +1,5 @@
import { Map } from 'immutable';
import { ADD_MEDIA, REMOVE_MEDIA } from '../actions/media';
import { ENTRY_PERSIST_SUCCESS } from '../actions/entries';
import MediaProxy from '../valueObjects/MediaProxy';
const medias = (state = Map(), action) => {
@ -9,11 +8,6 @@ const medias = (state = Map(), action) => {
return state.set(action.payload.path, action.payload);
case REMOVE_MEDIA:
return state.delete(action.payload);
case ENTRY_PERSIST_SUCCESS:
return state.map((media, path) => {
if (action.payload.persistedMediaFiles.indexOf(path) > -1) media.uploaded = true;
return media;
});
default:
return state;