Retain dialog data when reopening same dialog

This commit is contained in:
Natsumi
2026-01-31 05:56:32 +13:00
committed by pa
parent 5ff078e351
commit bf687a2405
8 changed files with 76 additions and 46 deletions
+7 -3
View File
@@ -65,7 +65,8 @@ export const useAvatarStore = defineStore('Avatar', () => {
cacheSize: '',
cacheLocked: false,
cachePath: '',
fileAnalysis: {}
fileAnalysis: {},
timeSpent: 0
});
const avatarHistory = ref([]);
@@ -183,7 +184,11 @@ export const useAvatarStore = defineStore('Avatar', () => {
id: avatarId,
skipBreadcrumb: options.skipBreadcrumb
});
D.visible = true;
if (D.id === avatarId) {
uiStore.setDialogCrumbLabel('avatar', D.id, D.ref?.name || D.id);
return;
}
D.loading = true;
D.id = avatarId;
D.inCache = false;
@@ -220,7 +225,6 @@ export const useAvatarStore = defineStore('Avatar', () => {
return;
}
}
D.visible = true;
avatarRequest
.getAvatar({ avatarId })
.then((args) => {