mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-01 04:33:46 +02:00
use computed to extract data
This commit is contained in:
@@ -244,19 +244,15 @@
|
||||
|
||||
const { sortFavorites } = storeToRefs(useAppearanceSettingsStore());
|
||||
const { setSortFavorites } = useAppearanceSettingsStore();
|
||||
const {
|
||||
favoriteAvatars,
|
||||
favoriteAvatarGroups,
|
||||
localAvatarFavorites,
|
||||
localAvatarFavoriteGroups,
|
||||
localAvatarFavoritesList
|
||||
} = storeToRefs(useFavoriteStore());
|
||||
const { favoriteAvatars, favoriteAvatarGroups, localAvatarFavorites } = storeToRefs(useFavoriteStore());
|
||||
const {
|
||||
showAvatarImportDialog,
|
||||
localAvatarFavGroupLength,
|
||||
deleteLocalAvatarFavoriteGroup,
|
||||
renameLocalAvatarFavoriteGroup,
|
||||
newLocalAvatarFavoriteGroup
|
||||
newLocalAvatarFavoriteGroup,
|
||||
localAvatarFavoritesList,
|
||||
localAvatarFavoriteGroups
|
||||
} = useFavoriteStore();
|
||||
const { avatarHistoryArray } = storeToRefs(useAvatarStore());
|
||||
const { promptClearAvatarHistory, showAvatarDialog, applyAvatar } = useAvatarStore();
|
||||
@@ -302,8 +298,8 @@
|
||||
}
|
||||
|
||||
const results = [];
|
||||
for (let i = 0; i < localAvatarFavoriteGroups.value.length; ++i) {
|
||||
const group = localAvatarFavoriteGroups.value[i];
|
||||
for (let i = 0; i < localAvatarFavoriteGroups.length; ++i) {
|
||||
const group = localAvatarFavoriteGroups[i];
|
||||
if (!localAvatarFavorites.value[group]) {
|
||||
continue;
|
||||
}
|
||||
@@ -436,7 +432,7 @@
|
||||
};
|
||||
refreshCancelToken.value = token;
|
||||
try {
|
||||
for (const avatarId of localAvatarFavoritesList.value) {
|
||||
for (const avatarId of localAvatarFavoritesList) {
|
||||
if (token.cancelled) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -245,13 +245,7 @@
|
||||
const { t } = useI18n();
|
||||
const { sortFavorites } = storeToRefs(useAppearanceSettingsStore());
|
||||
const { setSortFavorites } = useAppearanceSettingsStore();
|
||||
const {
|
||||
favoriteWorlds,
|
||||
favoriteWorldGroups,
|
||||
localWorldFavorites,
|
||||
localWorldFavoriteGroups,
|
||||
localWorldFavoritesList
|
||||
} = storeToRefs(useFavoriteStore());
|
||||
const { favoriteWorlds, favoriteWorldGroups, localWorldFavorites } = storeToRefs(useFavoriteStore());
|
||||
const {
|
||||
showWorldImportDialog,
|
||||
localWorldFavGroupLength,
|
||||
@@ -259,7 +253,9 @@
|
||||
renameLocalWorldFavoriteGroup,
|
||||
removeLocalWorldFavorite,
|
||||
newLocalWorldFavoriteGroup,
|
||||
handleFavoriteGroup
|
||||
handleFavoriteGroup,
|
||||
localWorldFavoritesList,
|
||||
localWorldFavoriteGroups
|
||||
} = useFavoriteStore();
|
||||
const { showWorldDialog } = useWorldStore();
|
||||
|
||||
@@ -440,8 +436,8 @@
|
||||
}
|
||||
|
||||
const results = [];
|
||||
for (let i = 0; i < localWorldFavoriteGroups.value.length; ++i) {
|
||||
const group = localWorldFavoriteGroups.value[i];
|
||||
for (let i = 0; i < localWorldFavoriteGroups.length; ++i) {
|
||||
const group = localWorldFavoriteGroups[i];
|
||||
if (!localWorldFavorites.value[group]) {
|
||||
continue;
|
||||
}
|
||||
@@ -498,7 +494,7 @@
|
||||
};
|
||||
refreshCancelToken.value = token;
|
||||
try {
|
||||
for (const worldId of localWorldFavoritesList.value) {
|
||||
for (const worldId of localWorldFavoritesList) {
|
||||
if (token.cancelled) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user