🐛 Bug fixes on loading state
This commit is contained in:
parent
c6b460315f
commit
2751ab1296
@ -59,11 +59,12 @@ class MyApp extends StatelessWidget {
|
||||
void _initializeProviders(BuildContext context) async {
|
||||
Get.lazyPut(() => SpotifyProvider());
|
||||
|
||||
Get.put(DatabaseProvider());
|
||||
|
||||
Get.put(AudioPlayerProvider());
|
||||
Get.put(ActiveSourcedTrackProvider());
|
||||
Get.put(AudioPlayerStreamProvider());
|
||||
|
||||
Get.put(DatabaseProvider());
|
||||
Get.put(PlaybackHistoryProvider());
|
||||
Get.put(SegmentsProvider());
|
||||
Get.put(PaletteProvider());
|
||||
|
@ -26,9 +26,13 @@ class SourcedTrackProvider extends GetxController {
|
||||
}
|
||||
});
|
||||
|
||||
query.isQueryingTrackInfo.value = true;
|
||||
final isCurrentTrack = playback.state.value.activeTrack?.id == track.id;
|
||||
|
||||
if (isCurrentTrack) query.isQueryingTrackInfo.value = true;
|
||||
|
||||
sourcedTrack.value = await SourcedTrack.fetchFromTrack(track: track);
|
||||
query.isQueryingTrackInfo.value = false;
|
||||
|
||||
if (isCurrentTrack) query.isQueryingTrackInfo.value = false;
|
||||
|
||||
return sourcedTrack.value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user