Open last dialog on error

This commit is contained in:
Natsumi
2026-02-01 03:14:07 +13:00
committed by pa
parent 8f57fbb572
commit c86cf5e5ed
7 changed files with 99 additions and 44 deletions
+9 -2
View File
@@ -221,8 +221,11 @@ export const useAvatarStore = defineStore('Avatar', () => {
ref2.authorId !== userStore.currentUser.id
) {
D.loading = false;
uiStore.closeMainDialog();
return;
D.id = null;
D.visible = false;
uiStore.jumpBackDialogCrumb();
toast.error(t('message.api_handler.avatar_private_or_deleted'));
throw new Error('Avatar is private or deleted');
}
}
avatarRequest
@@ -263,6 +266,10 @@ export const useAvatarStore = defineStore('Avatar', () => {
})
.catch((err) => {
D.visible = false;
D.id = null;
D.visible = false;
uiStore.jumpBackDialogCrumb();
toast.error(t('message.api_handler.avatar_private_or_deleted'));
throw err;
})
.finally(() => {