]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix follow request count to dynamically update
authormatildepark <matilde.park@pm.me>
Wed, 25 Aug 2021 15:46:29 +0000 (11:46 -0400)
committerClaire <claire.github-309c@sitedethib.com>
Fri, 27 Aug 2021 09:31:09 +0000 (11:31 +0200)
Port 79341d0f5f3eb2d90f5ea954f4037120f7189cec to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
app/javascript/flavours/glitch/actions/notifications.js

index bd3a34e5d90df2977b38b68bf6adf9c7d0f18f47..4b00ea632aeaf59b0aa72a1e255708c522ac4823 100644 (file)
@@ -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) {