mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 07:15:51 +08:00
audio sschedule shutdown
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -172,18 +172,19 @@ class _MainAppState extends PopScopeState<MainApp>
|
||||
|
||||
void _onHideWindow() {
|
||||
if (_mainController.pauseOnMinimize) {
|
||||
_mainController.isPlaying =
|
||||
PlPlayerController.instance?.playerStatus.value ==
|
||||
PlayerStatus.playing;
|
||||
PlPlayerController.pauseIfExists();
|
||||
if (PlPlayerController.instance case final player?) {
|
||||
if (_mainController.isPlaying = player.playerStatus.isPlaying) {
|
||||
player.pause();
|
||||
}
|
||||
} else {
|
||||
_mainController.isPlaying = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onShowWindow() {
|
||||
if (_mainController.pauseOnMinimize) {
|
||||
if (_mainController.isPlaying) {
|
||||
PlPlayerController.playIfExists();
|
||||
}
|
||||
if (_mainController.pauseOnMinimize && _mainController.isPlaying) {
|
||||
PlPlayerController.instance?.play();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user