0
0
Fork 0

Fix infinite scroll not working on profile media tab in web UI (#33860)

This commit is contained in:
Eugen Rochko 2025-03-03 15:16:17 +01:00 committed by GitHub
parent e5655a5f65
commit 43f616a1c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 297 additions and 269 deletions

View file

@ -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());