From 203f256181f0ea7148bfdff7d122c363643dbc46 Mon Sep 17 00:00:00 2001 From: wvffle Date: Tue, 15 Nov 2022 22:21:31 +0000 Subject: [PATCH] Refetch data on scope change --- front/src/components/library/Albums.vue | 2 +- front/src/components/library/Artists.vue | 2 +- front/src/components/library/Radios.vue | 2 +- front/src/views/playlists/List.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/src/components/library/Albums.vue b/front/src/components/library/Albums.vue index 43df74a74..53acdbd0a 100644 --- a/front/src/components/library/Albums.vue +++ b/front/src/components/library/Albums.vue @@ -94,7 +94,7 @@ const fetchData = async () => { const store = useStore() watch(() => store.state.moderation.lastUpdate, fetchData) -watch([page, tags, q], fetchData) +watch([page, tags, q, () => props.scope], fetchData) fetchData() const search = () => { diff --git a/front/src/components/library/Artists.vue b/front/src/components/library/Artists.vue index 1b2ec8f39..3ee3ff1f1 100644 --- a/front/src/components/library/Artists.vue +++ b/front/src/components/library/Artists.vue @@ -95,7 +95,7 @@ const fetchData = async () => { const store = useStore() watch([() => store.state.moderation.lastUpdate, excludeCompilation], fetchData) -watch([page, tags, q], fetchData) +watch([page, tags, q, () => props.scope], fetchData) fetchData() const search = () => { diff --git a/front/src/components/library/Radios.vue b/front/src/components/library/Radios.vue index ca57b7c51..574071c9e 100644 --- a/front/src/components/library/Radios.vue +++ b/front/src/components/library/Radios.vue @@ -84,7 +84,7 @@ const store = useStore() const isAuthenticated = computed(() => store.state.auth.authenticated) const hasFavorites = computed(() => store.state.favorites.count > 0) -watch([page, q], fetchData) +watch([page, q, () => props.scope], fetchData) fetchData() const search = () => { diff --git a/front/src/views/playlists/List.vue b/front/src/views/playlists/List.vue index 6d5ab3f68..47e75cad3 100644 --- a/front/src/views/playlists/List.vue +++ b/front/src/views/playlists/List.vue @@ -80,7 +80,7 @@ const fetchData = async () => { isLoading.value = false } } -watch([page, q], fetchData) +watch([page, q, () => props.scope], fetchData) fetchData() const search = () => {