about summary refs log tree commit diff
diff options
context:
space:
mode:
authormatildepark <matilde.park@pm.me>2021-08-25 11:46:29 -0400
committerGitHub <noreply@github.com>2021-08-25 17:46:29 +0200
commit79341d0f5f3eb2d90f5ea954f4037120f7189cec (patch)
tree24499d586f29e2b1b25fb3ab7d618e0fd011513d
parent5c21021176813313e656bf1c92177a930a1ca9cc (diff)
Fix follow request count to dynamically update (#16652)
-rw-r--r--app/javascript/mastodon/actions/notifications.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js
index 3464ac995..663cf21e3 100644
--- a/app/javascript/mastodon/actions/notifications.js
+++ b/app/javascript/mastodon/actions/notifications.js
@@ -1,6 +1,6 @@
 import api, { getLinks } from '../api';
 import IntlMessageFormat from 'intl-messageformat';
-import { fetchRelationships } from './accounts';
+import { fetchFollowRequests, fetchRelationships } from './accounts';
 import {
   importFetchedAccount,
   importFetchedAccounts,
@@ -78,6 +78,10 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
       filtered = regex && regex.test(searchIndex);
     }
 
+    if (['follow_request'].includes(notification.type)) {
+      dispatch(fetchFollowRequests());
+    }
+
     dispatch(submitMarkers());
 
     if (showInColumn) {