diff --git a/lib/services/queries/views.dart b/lib/services/queries/views.dart index 87e06c4eb..b56f07d92 100644 --- a/lib/services/queries/views.dart +++ b/lib/services/queries/views.dart @@ -21,7 +21,7 @@ class ViewsQueries { final locale = useContext().l10n.localeName; - return useQuery?, dynamic>("views/$view", () { + final query = useQuery?, dynamic>("views/$view", () { if (auth == null) return null; return customSpotify.getView( view, @@ -30,5 +30,18 @@ class ViewsQueries { locale: locale, ); }); + + useEffect(() { + return ref.listenManual( + customSpotifyEndpointProvider, + (previous, next) { + if (previous != next) { + query.refresh(); + } + }, + ).close; + }, [query]); + + return query; } }