mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 17:23:50 +02:00
Refactor: Delegate notification store updates to calling components after API responses.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { inviteMessagesRequest, notificationRequest } from '../../../api';
|
||||
import { useGalleryStore } from '../../../stores';
|
||||
import { useGalleryStore, useNotificationStore } from '../../../stores';
|
||||
|
||||
const { t } = useI18n();
|
||||
const galleryStore = useGalleryStore();
|
||||
@@ -101,9 +101,13 @@
|
||||
toast.error(t('message.error'));
|
||||
})
|
||||
.then((args) => {
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
});
|
||||
notificationRequest
|
||||
.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
})
|
||||
.then(() => {
|
||||
useNotificationStore().handleNotificationHide(I.invite.id);
|
||||
});
|
||||
toast.success(t('message.invite.response_sent'));
|
||||
return args;
|
||||
})
|
||||
@@ -118,9 +122,13 @@
|
||||
toast.error(t('message.error'));
|
||||
})
|
||||
.then((args) => {
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
});
|
||||
notificationRequest
|
||||
.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
})
|
||||
.then(() => {
|
||||
useNotificationStore().handleNotificationHide(I.invite.id);
|
||||
});
|
||||
toast.success(t('message.invite.response_sent'));
|
||||
return args;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user