diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 3c82f455c..34251d42d 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -148,8 +148,7 @@ const Notification = { id: this.user.id, credentials: useOAuthStore().token, }) - // TODO Fix this - this.$store.dispatch('removeFollowRequest', this.user) + useFollowRequestsStore().remove(this.user.id) useNotificationsStore().markSingleNotificationAsSeen(this.notification.id) this.hideApproveConfirmDialog() }, @@ -166,8 +165,7 @@ const Notification = { credentials: useOAuthStore().token, }).then(() => { useNotificationsStore().dismissNotificationLocal(this.notification.id) - // TODO Fix this - this.$store.dispatch('removeFollowRequest', this.user) + useFollowRequestsStore().remove(this.user.id) }) this.hideDenyConfirmDialog() }, diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js index 40d922228..f2702f430 100644 --- a/src/components/side_drawer/side_drawer.js +++ b/src/components/side_drawer/side_drawer.js @@ -62,10 +62,6 @@ const SideDrawer = { GestureService.DIRECTION_LEFT, this.toggleDrawer, ) - - if (this.currentUser?.locked) { - this.$store.dispatch('startFetchingFollowRequests') - } }, components: { UserCard, diff --git a/src/stores/users.js b/src/stores/users.js index c9445a65d..9d95c6b5e 100644 --- a/src/stores/users.js +++ b/src/stores/users.js @@ -689,7 +689,6 @@ export const useUsersStore = defineStore('users', { useBookmarkFoldersStore().startFetching() if (user.locked) { - dispatch('startFetchingFollowRequests') useFollowRequestsStore().startFetching() } @@ -739,8 +738,6 @@ export const useUsersStore = defineStore('users', { useFollowRequestsStore().stopFetching() } - store?.dispatch('stopFetchingFollowRequests') - // NOTE: No need to verify the app still exists, because if it doesn't, // the token will be invalid too return oauth @@ -798,7 +795,7 @@ export const useUsersStore = defineStore('users', { useListsStore().startFetching() useBookmarkFoldersStore().startFetching() useChatsStore().startFetching() - store?.dispatch('startFetchingFollowRequests') + useFollowRequestsStore().startFetching() }) .finally(() => { useNotificationsStore().resume()