diff --git a/lib/collections/intents.dart b/lib/collections/intents.dart index b1c5697d3..eb08adde6 100644 --- a/lib/collections/intents.dart +++ b/lib/collections/intents.dart @@ -28,14 +28,6 @@ class PlayPauseAction extends Action { if (playlist == null) { return null; } else if (!PlaylistQueueNotifier.isPlaying) { - // if (playlist.activeTrack is SpotubeTrack && - // (playlist.activeTrack as SpotubeTrack).ytUri.startsWith("http")) { - // final track = - // Track.fromJson((playlist.activeTrack as SpotubeTrack).toJson()); - - // await playlistNotifier.play(track); - // } else { - // } await playlistNotifier.play(); } else { await playlistNotifier.pause(); diff --git a/lib/components/player/player_overlay.dart b/lib/components/player/player_overlay.dart index 07850dfb5..553bb783a 100644 --- a/lib/components/player/player_overlay.dart +++ b/lib/components/player/player_overlay.dart @@ -27,6 +27,7 @@ class PlayerOverlay extends HookConsumerWidget { PlaylistQueueNotifier.provider.select((s) => s != null), ); final playlistNotifier = ref.watch(PlaylistQueueNotifier.notifier); + final playlist = ref.watch(PlaylistQueueNotifier.provider); final playing = useStream(PlaylistQueueNotifier.playing).data ?? PlaylistQueueNotifier.isPlaying; @@ -87,12 +88,18 @@ class PlayerOverlay extends HookConsumerWidget { Consumer( builder: (context, ref, _) { return IconButton( - icon: Icon( - playing - ? SpotubeIcons.pause - : SpotubeIcons.play, - color: paletteColor.bodyTextColor, - ), + icon: playlist?.isLoading == true + ? const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator(), + ) + : Icon( + playing + ? SpotubeIcons.pause + : SpotubeIcons.play, + color: paletteColor.bodyTextColor, + ), onPressed: Actions.handler( context, PlayPauseIntent(ref),