mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
[Glitch] Fix refreshing featured toots when the new collection is empty
Port d34a3a2cc72c12ae5119150a8ac18dd8fb7a4e6b to glitch-soc
This commit is contained in:
parent
34b8346e7f
commit
01aae33a5f
@ -35,7 +35,9 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is
|
||||
|
||||
if (!next && !isLoadingRecent) mMap.set('hasMore', false);
|
||||
|
||||
if (!statuses.isEmpty()) {
|
||||
if (timeline.endsWith(':pinned')) {
|
||||
mMap.set('items', statuses.map(status => status.get('id')));
|
||||
} else if (!statuses.isEmpty()) {
|
||||
mMap.update('items', ImmutableList(), oldIds => {
|
||||
const newIds = statuses.map(status => status.get('id'));
|
||||
const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user