Fix infinite scroll not working on profile media tab in web UI (#33860)
This commit is contained in:
parent
e5655a5f65
commit
43f616a1c8
6 changed files with 297 additions and 269 deletions
|
@ -91,25 +91,6 @@ export const makeGetReport = () => createSelector([
|
|||
(state, _, targetAccountId) => state.getIn(['accounts', targetAccountId]),
|
||||
], (base, targetAccount) => base.set('target_account', targetAccount));
|
||||
|
||||
export const getAccountGallery = createSelector([
|
||||
(state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),
|
||||
state => state.get('statuses'),
|
||||
(state, id) => state.getIn(['accounts', id]),
|
||||
], (statusIds, statuses, account) => {
|
||||
let medias = ImmutableList();
|
||||
|
||||
statusIds.forEach(statusId => {
|
||||
let status = statuses.get(statusId);
|
||||
|
||||
if (status) {
|
||||
status = status.set('account', account);
|
||||
medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
|
||||
}
|
||||
});
|
||||
|
||||
return medias;
|
||||
});
|
||||
|
||||
export const getStatusList = createSelector([
|
||||
(state, type) => state.getIn(['status_lists', type, 'items']),
|
||||
], (items) => items.toList());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue