about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/timelines.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-05-07 14:33:57 +0200
committerGitHub <noreply@github.com>2021-05-07 14:33:57 +0200
commit0ad240cb6b8662e31dfae6279cbee07a4c75b231 (patch)
treea0a95773093d562103ca121d8ea90366a1f5d291 /app/javascript/mastodon/reducers/timelines.js
parent74081433d0078784b7c2139f6caaa812740632b2 (diff)
Change home timeline to reload after follow recommendations in web UI (#16160)
Diffstat (limited to 'app/javascript/mastodon/reducers/timelines.js')
-rw-r--r--app/javascript/mastodon/reducers/timelines.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js
index 9156db021..b66c19fd5 100644
--- a/app/javascript/mastodon/reducers/timelines.js
+++ b/app/javascript/mastodon/reducers/timelines.js
@@ -9,6 +9,7 @@ import {
   TIMELINE_CONNECT,
   TIMELINE_DISCONNECT,
   TIMELINE_LOAD_PENDING,
+  TIMELINE_MARK_AS_PARTIAL,
 } from '../actions/timelines';
 import {
   ACCOUNT_BLOCK_SUCCESS,
@@ -168,6 +169,12 @@ export default function timelines(state = initialState, action) {
       initialTimeline,
       map => map.set('online', false).update(action.usePendingItems ? 'pendingItems' : 'items', items => items.first() ? items.unshift(null) : items),
     );
+  case TIMELINE_MARK_AS_PARTIAL:
+    return state.update(
+      action.timeline,
+      initialTimeline,
+      map => map.set('isPartial', true).set('items', ImmutableList()).set('pendingItems', ImmutableList()).set('unread', 0),
+    );
   default:
     return state;
   }