about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authormatildepark <matilde.park@pm.me>2021-08-25 11:46:29 -0400
committerClaire <claire.github-309c@sitedethib.com>2021-08-27 11:31:09 +0200
commit39193be1c464675ce9f51fc838a0e41264f23604 (patch)
treefadaf4a6f310a90d416b4c5ae6265c5e9f1c787b /app/javascript
parent463d23dfd5bdad1941807a8caf988f95a97050fd (diff)
[Glitch] Fix follow request count to dynamically update
Port 79341d0f5f3eb2d90f5ea954f4037120f7189cec to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/actions/notifications.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index bd3a34e5d..4b00ea632 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -1,6 +1,6 @@
 import api, { getLinks } from 'flavours/glitch/util/api';
 import IntlMessageFormat from 'intl-messageformat';
-import { fetchRelationships } from './accounts';
+import { fetchFollowRequests, fetchRelationships } from './accounts';
 import {
   importFetchedAccount,
   importFetchedAccounts,
@@ -90,6 +90,10 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
       filtered = regex && regex.test(searchIndex);
     }
 
+    if (['follow_request'].includes(notification.type)) {
+      dispatch(fetchFollowRequests());
+    }
+
     dispatch(submitMarkers());
 
     if (showInColumn) {