mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
use action from store instead of directly modifying state in components
This commit is contained in:
@@ -98,7 +98,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
vrcxStore.tryAutoBackupVrcRegistry();
|
||||
}
|
||||
if (--state.ipcTimeout <= 0) {
|
||||
vrcxStore.ipcEnabled = false;
|
||||
vrcxStore.setIpcEnabled(false);
|
||||
}
|
||||
if (
|
||||
--state.nextClearVRCXCacheCheck <= 0 &&
|
||||
@@ -141,7 +141,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
friendStore.isRefreshFriendsLoading = false;
|
||||
friendStore.setRefreshFriendsLoading(false);
|
||||
console.error(err);
|
||||
}
|
||||
workerTimers.setTimeout(() => updateLoop(), 1000);
|
||||
@@ -155,6 +155,10 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
state.nextGroupInstanceRefresh = value;
|
||||
}
|
||||
|
||||
function setNextDiscordUpdate(value) {
|
||||
state.nextDiscordUpdate = value;
|
||||
}
|
||||
|
||||
return {
|
||||
// state,
|
||||
|
||||
@@ -163,6 +167,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
nextDiscordUpdate,
|
||||
ipcTimeout,
|
||||
updateLoop,
|
||||
setNextDiscordUpdate,
|
||||
setNextGroupInstanceRefresh,
|
||||
setNextClearVRCXCacheCheck
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user