use computed to extract data

This commit is contained in:
pa
2025-10-27 23:19:48 +09:00
committed by Natsumi
parent 892790d5ab
commit 69bae719d9
8 changed files with 75 additions and 111 deletions

View File

@@ -76,14 +76,8 @@
const { t } = useI18n(); const { t } = useI18n();
const favoriteStore = useFavoriteStore(); const favoriteStore = useFavoriteStore();
const { const { favoriteFriendGroups, favoriteAvatarGroups, favoriteWorldGroups, favoriteDialog } =
favoriteFriendGroups, storeToRefs(favoriteStore);
favoriteAvatarGroups,
favoriteWorldGroups,
localAvatarFavoriteGroups,
favoriteDialog,
localWorldFavoriteGroups
} = storeToRefs(favoriteStore);
const { const {
localWorldFavGroupLength, localWorldFavGroupLength,
addLocalWorldFavorite, addLocalWorldFavorite,
@@ -93,7 +87,9 @@
localAvatarFavGroupLength, localAvatarFavGroupLength,
removeLocalAvatarFavorite, removeLocalAvatarFavorite,
removeLocalWorldFavorite, removeLocalWorldFavorite,
deleteFavoriteNoConfirm deleteFavoriteNoConfirm,
localWorldFavoriteGroups,
localAvatarFavoriteGroups
} = favoriteStore; } = favoriteStore;
const { isLocalUserVrcPlusSupporter } = storeToRefs(useUserStore()); const { isLocalUserVrcPlusSupporter } = storeToRefs(useUserStore());

View File

@@ -37,7 +37,25 @@ export const useFavoriteStore = defineStore('Favorite', () => {
const currentFavoriteTab = ref('friend'); const currentFavoriteTab = ref('friend');
const cachedFavoriteGroups = ref(new Map()); const cachedFavoriteGroups = ref(new Map());
const cachedFavoriteGroupsByTypeName = ref(new Map());
const cachedFavoriteGroupsByTypeName = computed(() => {
const group = {};
for (const k in favoriteFriendGroups.value) {
const element = favoriteFriendGroups.value[k];
group[element.key] = element;
}
for (const k in favoriteWorldGroups.value) {
const element = favoriteWorldGroups.value[k];
group[element.key] = element;
}
for (const k in favoriteAvatarGroups.value) {
const element = favoriteAvatarGroups.value[k];
group[element.key] = element;
}
return group;
});
const favoriteFriends = computed(() => { const favoriteFriends = computed(() => {
if (appearanceSettingsStore.sortFavorites) { if (appearanceSettingsStore.sortFavorites) {
@@ -104,10 +122,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
const localAvatarFavorites = ref({}); const localAvatarFavorites = ref({});
const localAvatarFavoritesList = ref([]);
const localAvatarFavoriteGroups = ref([]);
const favoriteDialog = ref({ const favoriteDialog = ref({
visible: false, visible: false,
loading: false, loading: false,
@@ -116,11 +130,27 @@ export const useFavoriteStore = defineStore('Favorite', () => {
currentGroup: {} currentGroup: {}
}); });
const localWorldFavoritesList = ref([]);
const cachedFavoritesByObjectId = ref(new Map()); const cachedFavoritesByObjectId = ref(new Map());
const localWorldFavoriteGroups = ref([]); const localAvatarFavoriteGroups = computed(() =>
Object.keys(localAvatarFavorites.value).sort()
);
const localWorldFavoriteGroups = computed(() =>
Object.keys(localWorldFavorites.value).sort()
);
const localWorldFavoritesList = computed(() =>
Object.values(localWorldFavorites.value)
.flat()
.map((fav) => fav.id)
);
const localAvatarFavoritesList = computed(() =>
Object.values(localAvatarFavorites.value)
.flat()
.map((fav) => fav.id)
);
const groupedByGroupKeyFavoriteFriends = computed(() => { const groupedByGroupKeyFavoriteFriends = computed(() => {
const groupedByGroupKeyFavoriteFriends = {}; const groupedByGroupKeyFavoriteFriends = {};
@@ -158,7 +188,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
cachedFavorites.clear(); cachedFavorites.clear();
cachedFavoritesByObjectId.value.clear(); cachedFavoritesByObjectId.value.clear();
cachedFavoriteGroups.value.clear(); cachedFavoriteGroups.value.clear();
cachedFavoriteGroupsByTypeName.value.clear();
favoriteFriendGroups.value = []; favoriteFriendGroups.value = [];
favoriteWorldGroups.value = []; favoriteWorldGroups.value = [];
favoriteAvatarGroups.value = []; favoriteAvatarGroups.value = [];
@@ -168,8 +197,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
state.favoriteFriends_ = []; state.favoriteFriends_ = [];
state.favoriteWorlds_ = []; state.favoriteWorlds_ = [];
state.favoriteAvatars_ = []; state.favoriteAvatars_ = [];
localAvatarFavoriteGroups.value = [];
localAvatarFavoritesList.value = [];
localAvatarFavorites.value = {}; localAvatarFavorites.value = {};
favoriteDialog.value.visible = false; favoriteDialog.value.visible = false;
worldImportDialogVisible.value = false; worldImportDialogVisible.value = false;
@@ -659,17 +686,12 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
} }
// update favorites // update favorites
cachedFavoriteGroupsByTypeName.value.clear();
for (const type in types) {
for (group of types[type]) {
cachedFavoriteGroupsByTypeName.value.set(group.key, group);
}
}
for (ref of cachedFavorites.values()) { for (ref of cachedFavorites.values()) {
if (ref.$isDeleted) { if (ref.$isDeleted) {
continue; continue;
} }
group = cachedFavoriteGroupsByTypeName.value.get(ref.$groupKey); group = cachedFavoriteGroupsByTypeName.value[ref.$groupKey];
if (typeof group === 'undefined') { if (typeof group === 'undefined') {
continue; continue;
} }
@@ -696,7 +718,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
console.error(err); console.error(err);
} }
expireFavorites(); expireFavorites();
cachedFavoriteGroupsByTypeName.value.clear();
processBulk({ processBulk({
fn: favoriteRequest.getFavorites, fn: favoriteRequest.getFavorites,
N: -1, N: -1,
@@ -798,9 +819,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
ref.$groupKey = `${ref.type}:${String(ref.tags[0])}`; ref.$groupKey = `${ref.type}:${String(ref.tags[0])}`;
if (ref.$isDeleted === false) { if (ref.$isDeleted === false) {
const group = cachedFavoriteGroupsByTypeName.value.get( const group = cachedFavoriteGroupsByTypeName.value[ref.$groupKey];
ref.$groupKey
);
if (typeof group !== 'undefined') { if (typeof group !== 'undefined') {
++group.count; ++group.count;
} }
@@ -934,15 +953,10 @@ export const useFavoriteStore = defineStore('Favorite', () => {
if (typeof ref === 'undefined') { if (typeof ref === 'undefined') {
return; return;
} }
if (!localWorldFavoritesList.value.includes(worldId)) {
localWorldFavoritesList.value.push(worldId);
}
if (!localWorldFavorites.value[group]) { if (!localWorldFavorites.value[group]) {
localWorldFavorites.value[group] = []; localWorldFavorites.value[group] = [];
} }
if (!localWorldFavoriteGroups.value.includes(group)) {
localWorldFavoriteGroups.value.push(group);
}
localWorldFavorites.value[group].unshift(ref); localWorldFavorites.value[group].unshift(ref);
database.addWorldToCache(ref); database.addWorldToCache(ref);
database.addWorldToFavorites(worldId, group); database.addWorldToFavorites(worldId, group);
@@ -995,15 +1009,9 @@ export const useFavoriteStore = defineStore('Favorite', () => {
if (typeof ref === 'undefined') { if (typeof ref === 'undefined') {
return; return;
} }
if (!localAvatarFavoritesList.value.includes(avatarId)) {
localAvatarFavoritesList.value.push(avatarId);
}
if (!localAvatarFavorites.value[group]) { if (!localAvatarFavorites.value[group]) {
localAvatarFavorites.value[group] = []; localAvatarFavorites.value[group] = [];
} }
if (!localAvatarFavoriteGroups.value.includes(group)) {
localAvatarFavoriteGroups.value.push(group);
}
localAvatarFavorites.value[group].unshift(ref); localAvatarFavorites.value[group].unshift(ref);
database.addAvatarToCache(ref); database.addAvatarToCache(ref);
database.addAvatarToFavorites(avatarId, group); database.addAvatarToFavorites(avatarId, group);
@@ -1086,7 +1094,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
avatarIdRemoveList.add(favoriteGroup[i].id); avatarIdRemoveList.add(favoriteGroup[i].id);
} }
removeFromArray(localAvatarFavoriteGroups.value, group);
delete localAvatarFavorites.value[group]; delete localAvatarFavorites.value[group];
database.deleteAvatarFavoriteGroup(group); database.deleteAvatarFavoriteGroup(group);
@@ -1137,7 +1144,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
} }
if (!avatarInFavorites) { if (!avatarInFavorites) {
removeFromArray(localAvatarFavoritesList.value, id);
if (!avatarStore.avatarHistory.has(id)) { if (!avatarStore.avatarHistory.has(id)) {
database.removeAvatarFromCache(id); database.removeAvatarFromCache(id);
} }
@@ -1146,7 +1152,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
function sortLocalAvatarFavorites() { function sortLocalAvatarFavorites() {
localAvatarFavoriteGroups.value.sort();
if (!appearanceSettingsStore.sortFavorites) { if (!appearanceSettingsStore.sortFavorites) {
for (let i = 0; i < localAvatarFavoriteGroups.value.length; ++i) { for (let i = 0; i < localAvatarFavoriteGroups.value.length; ++i) {
const group = localAvatarFavoriteGroups.value[i]; const group = localAvatarFavoriteGroups.value[i];
@@ -1172,10 +1177,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
}); });
return; return;
} }
localAvatarFavoriteGroups.value.push(newName);
localAvatarFavorites.value[newName] = localAvatarFavorites.value[group]; localAvatarFavorites.value[newName] = localAvatarFavorites.value[group];
removeFromArray(localAvatarFavoriteGroups.value, group);
delete localAvatarFavorites.value[group]; delete localAvatarFavorites.value[group];
database.renameAvatarFavoriteGroup(newName, group); database.renameAvatarFavoriteGroup(newName, group);
sortLocalAvatarFavorites(); sortLocalAvatarFavorites();
@@ -1198,9 +1201,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
if (!localAvatarFavorites.value[group]) { if (!localAvatarFavorites.value[group]) {
localAvatarFavorites.value[group] = []; localAvatarFavorites.value[group] = [];
} }
if (!localAvatarFavoriteGroups.value.includes(group)) {
localAvatarFavoriteGroups.value.push(group);
}
sortLocalAvatarFavorites(); sortLocalAvatarFavorites();
} }
@@ -1246,8 +1246,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
groupsArr = ['Favorites']; groupsArr = ['Favorites'];
} }
localAvatarFavoriteGroups.value = groupsArr;
localAvatarFavoritesList.value = Array.from(localListSet);
localAvatarFavorites.value = localFavorites; localAvatarFavorites.value = localFavorites;
sortLocalAvatarFavorites(); sortLocalAvatarFavorites();
@@ -1287,7 +1285,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
} }
if (!avatarInFavorites) { if (!avatarInFavorites) {
removeFromArray(localAvatarFavoritesList.value, avatarId);
if (!avatarStore.avatarHistory.has(avatarId)) { if (!avatarStore.avatarHistory.has(avatarId)) {
database.removeAvatarFromCache(avatarId); database.removeAvatarFromCache(avatarId);
} }
@@ -1324,7 +1321,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
worldIdRemoveList.add(favoriteGroup[i].id); worldIdRemoveList.add(favoriteGroup[i].id);
} }
removeFromArray(localWorldFavoriteGroups.value, group);
delete localWorldFavorites.value[group]; delete localWorldFavorites.value[group];
database.deleteWorldFavoriteGroup(group); database.deleteWorldFavoriteGroup(group);
@@ -1347,13 +1343,11 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
worldIdRemoveList.forEach((id) => { worldIdRemoveList.forEach((id) => {
removeFromArray(localWorldFavoritesList.value, id);
database.removeWorldFromCache(id); database.removeWorldFromCache(id);
}); });
} }
function sortLocalWorldFavorites() { function sortLocalWorldFavorites() {
localWorldFavoriteGroups.value.sort();
if (!appearanceSettingsStore.sortFavorites) { if (!appearanceSettingsStore.sortFavorites) {
for (let i = 0; i < localWorldFavoriteGroups.value.length; ++i) { for (let i = 0; i < localWorldFavoriteGroups.value.length; ++i) {
const group = localWorldFavoriteGroups.value[i]; const group = localWorldFavoriteGroups.value[i];
@@ -1379,10 +1373,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
}); });
return; return;
} }
localWorldFavoriteGroups.value.push(newName);
localWorldFavorites.value[newName] = localWorldFavorites.value[group]; localWorldFavorites.value[newName] = localWorldFavorites.value[group];
removeFromArray(localWorldFavoriteGroups.value, group);
delete localWorldFavorites.value[group]; delete localWorldFavorites.value[group];
database.renameWorldFavoriteGroup(newName, group); database.renameWorldFavoriteGroup(newName, group);
sortLocalWorldFavorites(); sortLocalWorldFavorites();
@@ -1422,7 +1414,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
} }
} }
if (!worldInFavorites) { if (!worldInFavorites) {
removeFromArray(localWorldFavoritesList.value, worldId);
database.removeWorldFromCache(worldId); database.removeWorldFromCache(worldId);
} }
database.removeWorldFromFavorites(worldId, group); database.removeWorldFromFavorites(worldId, group);
@@ -1486,8 +1477,6 @@ export const useFavoriteStore = defineStore('Favorite', () => {
groupsArr = ['Favorites']; groupsArr = ['Favorites'];
} }
localWorldFavoriteGroups.value = groupsArr;
localWorldFavoritesList.value = Array.from(localListSet);
localWorldFavorites.value = localFavorites; localWorldFavorites.value = localFavorites;
sortLocalWorldFavorites(); sortLocalWorldFavorites();
@@ -1587,6 +1576,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
localWorldFavoriteGroups, localWorldFavoriteGroups,
groupedByGroupKeyFavoriteFriends, groupedByGroupKeyFavoriteFriends,
currentFavoriteTab, currentFavoriteTab,
localWorldFavGroupLength,
localAvatarFavGroupLength,
initFavorites, initFavorites,
applyFavorite, applyFavorite,
@@ -1598,12 +1589,10 @@ export const useFavoriteStore = defineStore('Favorite', () => {
showWorldImportDialog, showWorldImportDialog,
showAvatarImportDialog, showAvatarImportDialog,
showFriendImportDialog, showFriendImportDialog,
localWorldFavGroupLength,
addLocalWorldFavorite, addLocalWorldFavorite,
hasLocalWorldFavorite, hasLocalWorldFavorite,
hasLocalAvatarFavorite, hasLocalAvatarFavorite,
addLocalAvatarFavorite, addLocalAvatarFavorite,
localAvatarFavGroupLength,
updateFavoriteDialog, updateFavoriteDialog,
deleteLocalAvatarFavoriteGroup, deleteLocalAvatarFavoriteGroup,
renameLocalAvatarFavoriteGroup, renameLocalAvatarFavoriteGroup,

View File

@@ -244,19 +244,15 @@
const { sortFavorites } = storeToRefs(useAppearanceSettingsStore()); const { sortFavorites } = storeToRefs(useAppearanceSettingsStore());
const { setSortFavorites } = useAppearanceSettingsStore(); const { setSortFavorites } = useAppearanceSettingsStore();
const { const { favoriteAvatars, favoriteAvatarGroups, localAvatarFavorites } = storeToRefs(useFavoriteStore());
favoriteAvatars,
favoriteAvatarGroups,
localAvatarFavorites,
localAvatarFavoriteGroups,
localAvatarFavoritesList
} = storeToRefs(useFavoriteStore());
const { const {
showAvatarImportDialog, showAvatarImportDialog,
localAvatarFavGroupLength, localAvatarFavGroupLength,
deleteLocalAvatarFavoriteGroup, deleteLocalAvatarFavoriteGroup,
renameLocalAvatarFavoriteGroup, renameLocalAvatarFavoriteGroup,
newLocalAvatarFavoriteGroup newLocalAvatarFavoriteGroup,
localAvatarFavoritesList,
localAvatarFavoriteGroups
} = useFavoriteStore(); } = useFavoriteStore();
const { avatarHistoryArray } = storeToRefs(useAvatarStore()); const { avatarHistoryArray } = storeToRefs(useAvatarStore());
const { promptClearAvatarHistory, showAvatarDialog, applyAvatar } = useAvatarStore(); const { promptClearAvatarHistory, showAvatarDialog, applyAvatar } = useAvatarStore();
@@ -302,8 +298,8 @@
} }
const results = []; const results = [];
for (let i = 0; i < localAvatarFavoriteGroups.value.length; ++i) { for (let i = 0; i < localAvatarFavoriteGroups.length; ++i) {
const group = localAvatarFavoriteGroups.value[i]; const group = localAvatarFavoriteGroups[i];
if (!localAvatarFavorites.value[group]) { if (!localAvatarFavorites.value[group]) {
continue; continue;
} }
@@ -436,7 +432,7 @@
}; };
refreshCancelToken.value = token; refreshCancelToken.value = token;
try { try {
for (const avatarId of localAvatarFavoritesList.value) { for (const avatarId of localAvatarFavoritesList) {
if (token.cancelled) { if (token.cancelled) {
break; break;
} }

View File

@@ -245,13 +245,7 @@
const { t } = useI18n(); const { t } = useI18n();
const { sortFavorites } = storeToRefs(useAppearanceSettingsStore()); const { sortFavorites } = storeToRefs(useAppearanceSettingsStore());
const { setSortFavorites } = useAppearanceSettingsStore(); const { setSortFavorites } = useAppearanceSettingsStore();
const { const { favoriteWorlds, favoriteWorldGroups, localWorldFavorites } = storeToRefs(useFavoriteStore());
favoriteWorlds,
favoriteWorldGroups,
localWorldFavorites,
localWorldFavoriteGroups,
localWorldFavoritesList
} = storeToRefs(useFavoriteStore());
const { const {
showWorldImportDialog, showWorldImportDialog,
localWorldFavGroupLength, localWorldFavGroupLength,
@@ -259,7 +253,9 @@
renameLocalWorldFavoriteGroup, renameLocalWorldFavoriteGroup,
removeLocalWorldFavorite, removeLocalWorldFavorite,
newLocalWorldFavoriteGroup, newLocalWorldFavoriteGroup,
handleFavoriteGroup handleFavoriteGroup,
localWorldFavoritesList,
localWorldFavoriteGroups
} = useFavoriteStore(); } = useFavoriteStore();
const { showWorldDialog } = useWorldStore(); const { showWorldDialog } = useWorldStore();
@@ -440,8 +436,8 @@
} }
const results = []; const results = [];
for (let i = 0; i < localWorldFavoriteGroups.value.length; ++i) { for (let i = 0; i < localWorldFavoriteGroups.length; ++i) {
const group = localWorldFavoriteGroups.value[i]; const group = localWorldFavoriteGroups[i];
if (!localWorldFavorites.value[group]) { if (!localWorldFavorites.value[group]) {
continue; continue;
} }
@@ -498,7 +494,7 @@
}; };
refreshCancelToken.value = token; refreshCancelToken.value = token;
try { try {
for (const worldId of localWorldFavoritesList.value) { for (const worldId of localWorldFavoritesList) {
if (token.cancelled) { if (token.cancelled) {
break; break;
} }

View File

@@ -102,14 +102,8 @@
const emit = defineEmits(['update:avatarExportDialogVisible']); const emit = defineEmits(['update:avatarExportDialogVisible']);
const favoriteStore = useFavoriteStore(); const favoriteStore = useFavoriteStore();
const { const { favoriteAvatars, favoriteAvatarGroups, localAvatarFavorites } = storeToRefs(favoriteStore);
favoriteAvatars, const { localAvatarFavGroupLength, localAvatarFavoritesList, localAvatarFavoriteGroups } = favoriteStore;
favoriteAvatarGroups,
localAvatarFavorites,
localAvatarFavoritesList,
localAvatarFavoriteGroups
} = storeToRefs(favoriteStore);
const { localAvatarFavGroupLength } = favoriteStore;
const { cachedAvatars } = useAvatarStore(); const { cachedAvatars } = useAvatarStore();
const avatarExportContent = ref(''); const avatarExportContent = ref('');
@@ -213,8 +207,8 @@
favoriteAvatars.value.forEach((ref) => { favoriteAvatars.value.forEach((ref) => {
lines.push(resText(ref.ref)); lines.push(resText(ref.ref));
}); });
for (let i = 0; i < localAvatarFavoritesList.value.length; ++i) { for (let i = 0; i < localAvatarFavoritesList.length; ++i) {
const avatarId = localAvatarFavoritesList.value[i]; const avatarId = localAvatarFavoritesList[i];
const ref = cachedAvatars.get(avatarId); const ref = cachedAvatars.get(avatarId);
if (typeof ref !== 'undefined') { if (typeof ref !== 'undefined') {
lines.push(resText(ref)); lines.push(resText(ref));

View File

@@ -190,9 +190,9 @@
const emit = defineEmits(['update:avatarImportDialogInput']); const emit = defineEmits(['update:avatarImportDialogInput']);
const { t } = useI18n(); const { t } = useI18n();
const { showUserDialog } = useUserStore(); const { showUserDialog } = useUserStore();
const { favoriteAvatarGroups, avatarImportDialogInput, avatarImportDialogVisible, localAvatarFavoriteGroups } = const { favoriteAvatarGroups, avatarImportDialogInput, avatarImportDialogVisible } =
storeToRefs(useFavoriteStore()); storeToRefs(useFavoriteStore());
const { addLocalAvatarFavorite, localAvatarFavGroupLength } = useFavoriteStore(); const { addLocalAvatarFavorite, localAvatarFavGroupLength, localAvatarFavoriteGroups } = useFavoriteStore();
const { showAvatarDialog, applyAvatar } = useAvatarStore(); const { showAvatarDialog, applyAvatar } = useAvatarStore();
const { showFullscreenImageDialog } = useGalleryStore(); const { showFullscreenImageDialog } = useGalleryStore();

View File

@@ -100,14 +100,8 @@
const { t } = useI18n(); const { t } = useI18n();
const favoriteStore = useFavoriteStore(); const favoriteStore = useFavoriteStore();
const { const { favoriteWorlds, favoriteWorldGroups, localWorldFavorites } = storeToRefs(favoriteStore);
favoriteWorlds, const { localWorldFavGroupLength, localWorldFavoritesList, localWorldFavoriteGroups } = favoriteStore;
favoriteWorldGroups,
localWorldFavorites,
localWorldFavoriteGroups,
localWorldFavoritesList
} = storeToRefs(favoriteStore);
const { localWorldFavGroupLength } = favoriteStore;
const { cachedWorlds } = useWorldStore(); const { cachedWorlds } = useWorldStore();
const worldExportContent = ref(''); const worldExportContent = ref('');
@@ -215,8 +209,8 @@
favoriteWorlds.value.forEach((ref) => { favoriteWorlds.value.forEach((ref) => {
lines.push(resText(ref.ref)); lines.push(resText(ref.ref));
}); });
for (let i = 0; i < localWorldFavoritesList.value.length; ++i) { for (let i = 0; i < localWorldFavoritesList.length; ++i) {
const worldId = localWorldFavoritesList.value[i]; const worldId = localWorldFavoritesList[i];
const ref = cachedWorlds.get(worldId); const ref = cachedWorlds.get(worldId);
if (typeof ref !== 'undefined') { if (typeof ref !== 'undefined') {
lines.push(resText(ref)); lines.push(resText(ref));

View File

@@ -184,9 +184,8 @@
import { removeFromArray } from '../../../shared/utils'; import { removeFromArray } from '../../../shared/utils';
const { showUserDialog } = useUserStore(); const { showUserDialog } = useUserStore();
const { favoriteWorldGroups, worldImportDialogInput, worldImportDialogVisible, localWorldFavoriteGroups } = const { favoriteWorldGroups, worldImportDialogInput, worldImportDialogVisible } = storeToRefs(useFavoriteStore());
storeToRefs(useFavoriteStore()); const { localWorldFavGroupLength, addLocalWorldFavorite, localWorldFavoriteGroups } = useFavoriteStore();
const { localWorldFavGroupLength, addLocalWorldFavorite } = useFavoriteStore();
const { showWorldDialog } = useWorldStore(); const { showWorldDialog } = useWorldStore();
const { showFullscreenImageDialog } = useGalleryStore(); const { showFullscreenImageDialog } = useGalleryStore();