mirror of
https://bitbucket.org/walplanet/deemix-gui
synced 2026-01-15 08:12:52 -03:00
set isRefreshingFavorites to true when refreshFavorites
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user