mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Refactor: Delegate notification store updates to calling components after API responses.
This commit is contained in:
@@ -1303,6 +1303,7 @@
|
||||
useLocationStore,
|
||||
useModalStore,
|
||||
useModerationStore,
|
||||
useNotificationStore,
|
||||
useUiStore,
|
||||
useUserStore,
|
||||
useWorldStore
|
||||
@@ -1971,9 +1972,18 @@
|
||||
});
|
||||
handleSendFriendRequest(args);
|
||||
} else {
|
||||
notificationRequest.acceptFriendRequestNotification({
|
||||
notificationId: key
|
||||
});
|
||||
notificationRequest
|
||||
.acceptFriendRequestNotification({
|
||||
notificationId: key
|
||||
})
|
||||
.then((args) => {
|
||||
useNotificationStore().handleNotificationAccept(args);
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err && err.message && err.message.includes('404')) {
|
||||
useNotificationStore().handleNotificationHide(key);
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'Decline Friend Request':
|
||||
@@ -1984,9 +1994,13 @@
|
||||
});
|
||||
handleCancelFriendRequest(args);
|
||||
} else {
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: key
|
||||
});
|
||||
notificationRequest
|
||||
.hideNotification({
|
||||
notificationId: key
|
||||
})
|
||||
.then(() => {
|
||||
useNotificationStore().handleNotificationHide(key);
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'Cancel Friend Request': {
|
||||
|
||||
Reference in New Issue
Block a user