mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Update UI on instance fetch
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, reactive, watch } from 'vue';
|
||||
import { computed, reactive, watch, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { instanceRequest, userRequest, worldRequest } from '../api';
|
||||
import configRepository from '../service/config';
|
||||
@@ -82,6 +82,8 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
|
||||
let cachedInstances = new Map();
|
||||
|
||||
const lastInstanceApplied = ref('');
|
||||
|
||||
const currentInstanceWorld = computed({
|
||||
get: () => state.currentInstanceWorld,
|
||||
set: (value) => {
|
||||
@@ -417,6 +419,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
groupInstance.instance = ref;
|
||||
}
|
||||
}
|
||||
lastInstanceApplied.value = ref.id;
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -1230,6 +1233,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
state,
|
||||
|
||||
cachedInstances,
|
||||
lastInstanceApplied,
|
||||
currentInstanceWorld,
|
||||
currentInstanceLocation,
|
||||
queuedInstances,
|
||||
|
||||
Reference in New Issue
Block a user