fix(controlcenter): refresh player state on resume

When control center hides, PlayerBox.suspend() blocks all signal
handlers. On resume(), clearing the flag wasn't enough — stale
state lingered until next fabricator poll (up to 5s). Now resume()
immediately syncs play/pause icon, metadata, and artwork.
This commit is contained in:
sankalp committed 2026-07-15 21:22:51 +05:45
1 parent 42ede60800
commit 4378959131
1 file changed
+10
+10
View File
@@ -570,6 +570,16 @@ class PlayerBox(Box):
def resume(self):
self.exit = False
if self.player is not None:
current_status = str(self.player.playback_status).lower()
self._last_notified_status = current_status
self.play_pause_icon.dynamic_file(
"player/play.svg"
if current_status == "paused"
else "player/pause.svg"
)
self._on_metadata(self.player, self.player._player.props.metadata)
self.set_image()
def _on_map(self, *_):
self._check_and_update_playing_state()