From 39193be1c464675ce9f51fc838a0e41264f23604 Mon Sep 17 00:00:00 2001 From: matildepark Date: Wed, 25 Aug 2021 11:46:29 -0400 Subject: [PATCH] [Glitch] Fix follow request count to dynamically update Port 79341d0f5f3eb2d90f5ea954f4037120f7189cec to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/actions/notifications.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) {