fix: screen not activated on app load

This commit is contained in:
Phan An 2022-09-21 15:40:06 +07:00
parent 25c9da4c82
commit 4eab978bb0
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -30,7 +30,7 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, ref, toRef } from 'vue'
import { defineAsyncComponent, onMounted, ref, toRef } from 'vue'
import { eventBus } from '@/utils'
import { preferenceStore } from '@/stores'
import { useThirdPartyServices } from '@/composables'
@ -45,6 +45,7 @@ import FavoritesScreen from '@/components/screens/FavoritesScreen.vue'
import RecentlyPlayedScreen from '@/components/screens/RecentlyPlayedScreen.vue'
import UploadScreen from '@/components/screens/UploadScreen.vue'
import SearchExcerptsScreen from '@/components/screens/search/SearchExcerptsScreen.vue'
import router from '@/router'
const UserListScreen = defineAsyncComponent(() => import('@/components/screens/UserListScreen.vue'))
const AlbumArtOverlay = defineAsyncComponent(() => import('@/components/ui/AlbumArtOverlay.vue'))
@ -73,6 +74,8 @@ eventBus.on({
TOGGLE_VISUALIZER: () => (showingVisualizer.value = !showingVisualizer.value),
SONG_STARTED: (song: Song) => (currentSong.value = song)
})
onMounted(() => router.resolveRoute())
</script>
<style lang="scss">