1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-11 13:19:01 +09:00

[Glitch] Consider shown and pending status in explore prompt calculation

Port f76e5111f0 to glitch-soc

Co-authored-by: Brian Campbell <brcampbell@beta.team>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Brian Campbell 2023-10-19 08:25:57 -04:00 committed by Claire
parent 41f58e945c
commit 1a3248dc90

View File

@ -37,7 +37,7 @@ const getHomeFeedSpeed = createSelector([
state => state.getIn(['timelines', 'home', 'pendingItems'], ImmutableList()), state => state.getIn(['timelines', 'home', 'pendingItems'], ImmutableList()),
state => state.get('statuses'), state => state.get('statuses'),
], (statusIds, pendingStatusIds, statusMap) => { ], (statusIds, pendingStatusIds, statusMap) => {
const recentStatusIds = pendingStatusIds.size > 0 ? pendingStatusIds : statusIds; const recentStatusIds = pendingStatusIds.concat(statusIds);
const statuses = recentStatusIds.filter(id => id !== null).map(id => statusMap.get(id)).filter(status => status?.get('account') !== me).take(20); const statuses = recentStatusIds.filter(id => id !== null).map(id => statusMap.get(id)).filter(status => status?.get('account') !== me).take(20);
if (statuses.isEmpty()) { if (statuses.isEmpty()) {