mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
update group sidebar instances when fetching instance
This commit is contained in:
+5
-5
@@ -852,9 +852,9 @@ export const useGroupStore = defineStore('Group', () => {
|
|||||||
// tack on fetchedAt
|
// tack on fetchedAt
|
||||||
json.$fetchedAt = args.json.fetchedAt;
|
json.$fetchedAt = args.json.fetchedAt;
|
||||||
}
|
}
|
||||||
instanceStore.applyInstance(json);
|
const instanceRef = instanceStore.applyInstance(json);
|
||||||
const ref = state.cachedGroups.get(json.ownerId);
|
const groupRef = state.cachedGroups.get(json.ownerId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof groupRef === 'undefined') {
|
||||||
if (watchState.isFriendsLoaded) {
|
if (watchState.isFriendsLoaded) {
|
||||||
const args = await groupRequest.getGroup({
|
const args = await groupRequest.getGroup({
|
||||||
groupId: json.ownerId
|
groupId: json.ownerId
|
||||||
@@ -864,8 +864,8 @@ export const useGroupStore = defineStore('Group', () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.groupInstances.push({
|
state.groupInstances.push({
|
||||||
group: ref,
|
group: groupRef,
|
||||||
instance: instanceStore.applyInstance(json)
|
instance: instanceRef
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,6 +416,11 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
) {
|
) {
|
||||||
applyGroupDialogInstances();
|
applyGroupDialogInstances();
|
||||||
}
|
}
|
||||||
|
for (const groupInstance of groupStore.groupInstances) {
|
||||||
|
if (groupInstance.instance.id === ref.id) {
|
||||||
|
groupInstance.instance = ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user