mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 21:29:36 +02:00
feat(player): restore playback session after process death
Queue, current index, position, and shuffle flag are snapshotted to a new app_state playback_session table on pause, track change, and queue mutation (never on position ticks). On launch the session is restored paused into the mini player; the first play seeks to the saved position. Plain file paths that no longer exist are dropped, an explicit stop or mini-player dismiss clears the snapshot, and the installation-restore guard wipes it alongside the download queue.
This commit is contained in:
1 parent
c9470ef751
commit
54dcdb92dd
3 files changed
+249
-2
No files matched your search
@@ -119,6 +119,7 @@ class _MainShellState extends ConsumerState<MainShell>
|
||||
);
|
||||
_initialSafRepairComplete = true;
|
||||
if (!mounted) return;
|
||||
unawaited(restorePersistedPlaybackSession());
|
||||
_setupShareListener();
|
||||
await _checkSafMigration();
|
||||
final updateDialogShown = await _checkForUpdates();
|
||||
|
||||
Reference in new issue
Block a user