0
0
Fork 0

Add account media gallery view to web UI (#3120)

* Add account media gallery view to web UI

* Link media view from account dropdown

* Adjust link
This commit is contained in:
Eugen Rochko 2017-05-20 01:28:25 +02:00 committed by GitHub
parent b369fc2de4
commit de475cf8d3
14 changed files with 381 additions and 20 deletions

View file

@ -74,3 +74,17 @@ export const makeGetNotification = () => {
return base.set('account', account);
});
};
export const getAccountGallery = createSelector([
(state, id) => state.getIn(['timelines', 'accounts_media_timelines', id, 'items'], Immutable.List()),
state => state.get('statuses'),
], (statusIds, statuses) => {
let medias = Immutable.List();
statusIds.forEach(statusId => {
const status = statuses.get(statusId);
medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
});
return medias;
});