Fix opening last active tab

This commit is contained in:
Natsumi
2026-01-22 16:18:07 +13:00
parent 98fbadae2f
commit a1f4a22609
8 changed files with 34 additions and 32 deletions
+1
View File
@@ -47,6 +47,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
const avatarDialog = ref({
visible: false,
loading: false,
lastActiveTab: 'Info',
id: '',
memo: '',
ref: {},
+2 -1
View File
@@ -46,6 +46,7 @@ export const useGroupStore = defineStore('Group', () => {
const groupDialog = ref({
visible: false,
loading: false,
lastActiveTab: 'Info',
isGetGroupDialogGroupLoading: false,
treeData: {},
id: '',
@@ -178,7 +179,6 @@ export const useGroupStore = defineStore('Group', () => {
})
.then((args) => {
if (groupId === args.ref.id) {
D.loading = false;
D.ref = args.ref;
uiStore.setDialogCrumbLabel(
'group',
@@ -447,6 +447,7 @@ export const useGroupStore = defineStore('Group', () => {
.then((args) => {
const ref = applyGroup(args.json);
if (D.id === ref.id) {
D.loading = false;
D.ref = ref;
D.inGroup = ref.membershipStatus === 'member';
for (const role of ref.roles) {
+6 -2
View File
@@ -183,6 +183,7 @@ export const useUserStore = defineStore('User', () => {
const userDialog = ref({
visible: false,
loading: false,
lastActiveTab: 'Info',
id: '',
ref: {},
friend: {},
@@ -900,7 +901,11 @@ export const useUserStore = defineStore('User', () => {
} else if (D.ref.friendRequestStatus === 'outgoing') {
D.outgoingRequest = true;
}
userRequest.getUser(args.params);
userRequest.getUser(args.params).then((args1) => {
if (args1.ref.id === D.id) {
D.loading = false;
}
});
let inCurrentWorld = false;
if (
locationStore.lastLocation.playerList.has(D.ref.id)
@@ -1015,7 +1020,6 @@ export const useUserStore = defineStore('User', () => {
.then((args1) => {
groupStore.handleGroupRepresented(args1);
});
D.loading = false;
D.visible = true;
applyUserDialogLocation(true);
});
+9 -13
View File
@@ -36,6 +36,7 @@ export const useWorldStore = defineStore('World', () => {
const worldDialog = reactive({
visible: false,
loading: false,
lastActiveTab: 'Instances',
id: '',
memo: '',
$location: {},
@@ -158,7 +159,6 @@ export const useWorldStore = defineStore('World', () => {
})
.then((args) => {
if (D.id === args.ref.id) {
D.loading = false;
D.ref = args.ref;
uiStore.setDialogCrumbLabel(
'world',
@@ -203,18 +203,14 @@ export const useWorldStore = defineStore('World', () => {
});
if (args.cache) {
worldRequest
.getWorld(args.params)
.catch((err) => {
throw err;
})
.then((args1) => {
if (D.id === args1.ref.id) {
D.ref = args1.ref;
updateVRChatWorldCache();
}
return args1;
});
worldRequest.getWorld(args.params).then((args1) => {
if (D.id === args1.ref.id) {
D.loading = false;
D.ref = args1.ref;
updateVRChatWorldCache();
}
return args1;
});
}
}
D.visible = true;