fix(mobile): player overlay should not be visible when the player is not playing

This commit is contained in:
Kingkor Roy Tirtho 2024-04-11 16:53:52 +06:00
parent bc5d66d057
commit 41b59b7086
2 changed files with 2 additions and 7 deletions

View File

@ -24,11 +24,10 @@ class PlayerOverlay extends HookConsumerWidget {
@override
Widget build(BuildContext context, ref) {
final canShow = ref.watch(
ProxyPlaylistNotifier.provider.select((s) => s.active != null),
);
final playlistNotifier = ref.watch(ProxyPlaylistNotifier.notifier);
final playlist = ref.watch(ProxyPlaylistNotifier.provider);
final canShow = playlist.activeTrack != null;
final playing =
useStream(audioPlayer.playingStream).data ?? audioPlayer.isPlaying;

View File

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:spotube/models/logger.dart';
void useCustomStatusBarColor(
Color color,
@ -48,9 +47,6 @@ void useCustomStatusBarColor(
if (automaticSystemUiAdjustment != null) {
// ignore: deprecated_member_use
WidgetsBinding.instance.renderView.automaticSystemUiAdjustment = false;
getLogger(["useCustomStatusBarColor"]).w(
"renderView.automaticSystemUiAdjustment is deprecated. Please use SystemChrome.setSystemUIOverlayStyle instead.",
);
}
};
}, [color, isCurrentRoute, statusBarColor]);