set isRefreshingFavorites to true when refreshFavorites

This commit is contained in:
Walid Saleh
2023-12-06 16:49:42 +00:00
parent cbbe456312
commit 90d60f6971

View File

@@ -1,5 +1,4 @@
import { ref, computed } from '@vue/composition-api'
import store from '@/store'
import { fetchData } from '@/utils/api'
import { toast } from '@/utils/toasts'
@@ -20,7 +19,6 @@ const setAllFavorites = data => {
const { tracks, albums, artists, playlists, lovedTracks } = data
isRefreshingFavorites.value = false
favoriteArtists.value = artists || []
favoriteAlbums.value = albums || []
favoritePlaylists.value = playlists || []
@@ -47,10 +45,8 @@ const setSpotifyPlaylists = response => {
favoriteSpotifyPlaylists.value = response || []
}
const refreshFavorites = async ({ isInitial = false }) => {
if (!isInitial) {
isRefreshingFavorites.value = true
}
const refreshFavorites = async () => {
isRefreshingFavorites.value = true
await store.dispatch('refreshSpotifyStatus')