From 28796d134241f9500d78365aaf1c93579f5e78e8 Mon Sep 17 00:00:00 2001 From: matildepark Date: Wed, 25 Aug 2021 11:46:29 -0400 Subject: [PATCH] Fix follow request count to dynamically update (#16652) --- app/javascript/mastodon/actions/notifications.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index 3464ac9959..663cf21e34 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) {