diff --git a/src/stores/avatar.js b/src/stores/avatar.js index 7c20d04e..31b6cb7f 100644 --- a/src/stores/avatar.js +++ b/src/stores/avatar.js @@ -2,6 +2,8 @@ import { ref, watch } from 'vue'; import { defineStore } from 'pinia'; import { checkVRChatCache } from '../shared/utils'; +import { queryRequest } from '../api'; +import { getAvatarHistory, preloadOwnAvatars } from '../coordinators/avatarCoordinator'; import { database } from '../services/database'; import { watchState } from '../services/watchState'; @@ -48,12 +50,8 @@ export const useAvatarStore = defineStore('Avatar', () => { cachedAvatarModerations.clear(); avatarHistory.value = []; if (isLoggedIn) { - import('../coordinators/avatarCoordinator').then( - ({ getAvatarHistory, preloadOwnAvatars }) => { - getAvatarHistory(); - preloadOwnAvatars(); - } - ); + getAvatarHistory(); + preloadOwnAvatars(); } }, { flush: 'sync' } @@ -86,7 +84,7 @@ export const useAvatarStore = defineStore('Avatar', () => { * @returns {Promise} */ async function getAvatarGallery(avatarId) { - const { queryRequest } = await import('../api'); + const D = avatarDialog.value; const args = await queryRequest .fetch('avatarGallery', { avatarId }) diff --git a/src/stores/group.js b/src/stores/group.js index 191b7eaf..26a832e9 100644 --- a/src/stores/group.js +++ b/src/stores/group.js @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import { hasGroupPermission, replaceBioSymbols } from '../shared/utils'; import { groupRequest, queryRequest } from '../api'; +import { initUserGroups } from '../coordinators/groupCoordinator'; import { watchState } from '../services/watchState'; export const useGroupStore = defineStore('Group', () => { @@ -93,10 +94,7 @@ export const useGroupStore = defineStore('Group', () => { cachedGroups.clear(); currentUserGroups.clear(); if (isLoggedIn) { - // initUserGroups is called from groupCoordinator via this watcher or externally - import('../coordinators/groupCoordinator').then((mod) => { - mod.initUserGroups(); - }); + initUserGroups(); } }, { flush: 'sync' } diff --git a/src/stores/world.js b/src/stores/world.js index d4b1fc18..6e1d9ddd 100644 --- a/src/stores/world.js +++ b/src/stores/world.js @@ -2,6 +2,7 @@ import { reactive, shallowReactive, watch } from 'vue'; import { defineStore } from 'pinia'; import { checkVRChatCache } from '../shared/utils'; +import { preloadOwnWorlds } from '../coordinators/worldCoordinator'; import { watchState } from '../services/watchState'; export const useWorldStore = defineStore('World', () => { @@ -40,9 +41,7 @@ export const useWorldStore = defineStore('World', () => { worldDialog.visible = false; cachedWorlds.clear(); if (isLoggedIn) { - import('../coordinators/worldCoordinator').then( - ({ preloadOwnWorlds }) => preloadOwnWorlds() - ); + preloadOwnWorlds(); } }, { flush: 'sync' } diff --git a/src/views/Tools/Tools.vue b/src/views/Tools/Tools.vue index 092f10a4..25ed45d5 100644 --- a/src/views/Tools/Tools.vue +++ b/src/views/Tools/Tools.vue @@ -226,7 +226,7 @@ const ExportDiscordNamesDialog = defineAsyncComponent(() => import('./dialogs/ExportDiscordNamesDialog.vue')); const ExportFriendsListDialog = defineAsyncComponent(() => import('./dialogs/ExportFriendsListDialog.vue')); const ExportAvatarsListDialog = defineAsyncComponent(() => import('./dialogs/ExportAvatarsListDialog.vue')); - const RegistryBackupDialog = defineAsyncComponent(() => import('./dialogs/RegistryBackupDialog.vue')); + import RegistryBackupDialog from './dialogs/RegistryBackupDialog.vue'; const { t } = useI18n(); const router = useRouter();