refactor: use setter functions for dialog visibility and favorite status in stores

This commit is contained in:
pa
2026-03-08 20:58:33 +09:00
parent ae0152c28e
commit c55d5f0ec7
19 changed files with 376 additions and 102 deletions

View File

@@ -406,7 +406,7 @@ export const useAppearanceSettingsStore = defineStore(
}
if (randomUserColours.value) {
const colour = await getNameColour(userStore.currentUser.id);
userStore.currentUser.$userColour = colour;
userStore.setCurrentUserColour(colour);
userColourInit();
} else {
applyUserTrustLevel(userStore.currentUser);
@@ -1016,14 +1016,14 @@ export const useAppearanceSettingsStore = defineStore(
return;
}
vrcxStore.maxTableSize = nextMaxTableSize;
vrcxStore.setMaxTableSize(nextMaxTableSize);
await configRepository.setInt(
'VRCX_maxTableSize_v2',
vrcxStore.maxTableSize
);
database.setMaxTableSize(vrcxStore.maxTableSize);
vrcxStore.searchLimit = nextSearchLimit;
vrcxStore.setSearchLimit(nextSearchLimit);
await configRepository.setInt(
'VRCX_searchLimit',
vrcxStore.searchLimit
@@ -1043,7 +1043,7 @@ export const useAppearanceSettingsStore = defineStore(
return;
}
const colour = await getNameColour(userStore.currentUser.id);
userStore.currentUser.$userColour = colour;
userStore.setCurrentUserColour(colour);
await userColourInit();
}