about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/notifications.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-23 00:48:31 +0200
committerGitHub <noreply@github.com>2019-09-23 00:48:31 +0200
commit8c4b5f7cef60700af7ae64c7b524d899a1d033c5 (patch)
tree9c0052851005354e4aca4ee7b35917b166c7eefe /app/javascript/mastodon/reducers/notifications.js
parentb359974d9b356bb723fe046466b178328cf9bbaf (diff)
Revert "Change timelines to add new items to pending items when scrolled down #11867" (#11921)
Fix #11912
Diffstat (limited to 'app/javascript/mastodon/reducers/notifications.js')
-rw-r--r--app/javascript/mastodon/reducers/notifications.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js
index aac644950..6ba80bd6a 100644
--- a/app/javascript/mastodon/reducers/notifications.js
+++ b/app/javascript/mastodon/reducers/notifications.js
@@ -38,10 +38,9 @@ const notificationToMap = notification => ImmutableMap({
 });
 
 const normalizeNotification = (state, notification, usePendingItems) => {
-  const top     = state.get('top');
-  const mounted = state.get('mounted');
+  const top = state.get('top');
 
-  if (usePendingItems || (!top && mounted) || !state.get('pendingItems').isEmpty()) {
+  if (usePendingItems || !state.get('pendingItems').isEmpty()) {
     return state.update('pendingItems', list => list.unshift(notificationToMap(notification))).update('unread', unread => unread + 1);
   }
 
@@ -67,7 +66,7 @@ const expandNormalizedNotifications = (state, notifications, next, isLoadingRece
 
   return state.withMutations(mutable => {
     if (!items.isEmpty()) {
-      usePendingItems = isLoadingRecent && (usePendingItems || (!mutable.get('top') && mutable.get('mounted')) || !mutable.get('pendingItems').isEmpty());
+      usePendingItems = isLoadingRecent && (usePendingItems || !mutable.get('pendingItems').isEmpty());
 
       mutable.update(usePendingItems ? 'pendingItems' : 'items', list => {
         const lastIndex = 1 + list.findLastIndex(