mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-05-08 16:24:36 +00:00
fix(proxy-playlist): reset collections on load
This commit is contained in:
parent
d1c026e748
commit
0afd5978d9
@ -72,7 +72,7 @@ class PlaylistCard extends HookConsumerWidget {
|
|||||||
|
|
||||||
List<Track> fetchedTracks = await fetchAllTracks();
|
List<Track> fetchedTracks = await fetchAllTracks();
|
||||||
|
|
||||||
if (fetchedTracks.isEmpty) return;
|
if (fetchedTracks.isEmpty || !context.mounted) return;
|
||||||
|
|
||||||
final isRemoteDevice = await showSelectDeviceDialog(context, ref);
|
final isRemoteDevice = await showSelectDeviceDialog(context, ref);
|
||||||
if (isRemoteDevice) {
|
if (isRemoteDevice) {
|
||||||
|
|||||||
@ -106,6 +106,8 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist> {
|
|||||||
}) async {
|
}) async {
|
||||||
tracks = blacklist.filter(tracks).toList() as List<Track>;
|
tracks = blacklist.filter(tracks).toList() as List<Track>;
|
||||||
|
|
||||||
|
state = state.copyWith(collections: {});
|
||||||
|
|
||||||
await audioPlayer.openPlaylist(
|
await audioPlayer.openPlaylist(
|
||||||
tracks.asMediaList(),
|
tracks.asMediaList(),
|
||||||
initialIndex: initialIndex,
|
initialIndex: initialIndex,
|
||||||
|
|||||||
@ -28,8 +28,6 @@ class DownloadTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
status.addListener(listener);
|
status.addListener(listener);
|
||||||
|
|
||||||
return completer.future.timeout(timeout);
|
return completer.future.timeout(timeout);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user