about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers/timelines.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-09-30 16:38:09 -0700
committerReverite <github@reverite.sh>2019-09-30 16:38:09 -0700
commit01001ba118d7adcd4966c893cf95db32fe76c273 (patch)
treefc8b580c8f0a3c1e14a8ca20e3bea5bd7acb4ff1 /app/javascript/flavours/glitch/reducers/timelines.js
parent1e75b3d874973dd71ea74b158ebeb501d9ac68a3 (diff)
parent65db9df011a3e13efa79f4e56343aa69bdad7716 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/timelines.js')
-rw-r--r--app/javascript/flavours/glitch/reducers/timelines.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js
index e6bef18e9..df88a6c23 100644
--- a/app/javascript/flavours/glitch/reducers/timelines.js
+++ b/app/javascript/flavours/glitch/reducers/timelines.js
@@ -40,7 +40,8 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is
     if (timeline.endsWith(':pinned')) {
       mMap.set('items', statuses.map(status => status.get('id')));
     } else if (!statuses.isEmpty()) {
-      usePendingItems = isLoadingRecent && (usePendingItems || !mMap.get('top') || !mMap.get('pendingItems').isEmpty());
+      usePendingItems = isLoadingRecent && (usePendingItems || !mMap.get('pendingItems').isEmpty());
+
       mMap.update(usePendingItems ? 'pendingItems' : 'items', ImmutableList(), oldIds => {
         const newIds = statuses.map(status => status.get('id'));
         const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1;
@@ -62,7 +63,7 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is
 const updateTimeline = (state, timeline, status, usePendingItems) => {
   const top = state.getIn([timeline, 'top']);
 
-  if (usePendingItems || !top || !state.getIn([timeline, 'pendingItems']).isEmpty()) {
+  if (usePendingItems || !state.getIn([timeline, 'pendingItems']).isEmpty()) {
     if (state.getIn([timeline, 'pendingItems'], ImmutableList()).includes(status.get('id')) || state.getIn([timeline, 'items'], ImmutableList()).includes(status.get('id'))) {
       return state;
     }