Merge commit 'cfb473c204
' into upstream-20250228
This commit is contained in:
commit
795561f5a7
78 changed files with 1684 additions and 1081 deletions
|
@ -109,27 +109,23 @@ export const makeGetReport = () => createSelector([
|
|||
|
||||
export const getAccountGallery = createSelector([
|
||||
(state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),
|
||||
state => state.get('statuses'),
|
||||
state => state.get('statuses'),
|
||||
(state, id) => state.getIn(['accounts', id]),
|
||||
], (statusIds, statuses, account) => {
|
||||
let medias = ImmutableList();
|
||||
|
||||
statusIds.forEach(statusId => {
|
||||
const status = statuses.get(statusId).set('account', account);
|
||||
medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
|
||||
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 getAccountHidden = createSelector([
|
||||
(state, id) => state.getIn(['accounts', id, 'hidden']),
|
||||
(state, id) => state.getIn(['relationships', id, 'following']) || state.getIn(['relationships', id, 'requested']),
|
||||
(state, id) => id === me,
|
||||
], (hidden, followingOrRequested, isSelf) => {
|
||||
return hidden && !(isSelf || followingOrRequested);
|
||||
});
|
||||
|
||||
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