Wholphin/app
Ray f9ff04c5b7
Fix issues when the system kills the app during playback (#1116)
## Description
This fixes some issues restoring the app state after it is killed by the
system, such as to free up memory while the screensaver is showing.

### Dev notes

Reproduce:
1. Start playing media from beginning
2. Pause at 10 minute mark
3. Wait for screensaver to start
4. Press a button
5. Media starts from beginning

Note: It may take a few iterations of 2-4 before the OS destroys the
app.

If the app is killed during playback, ideally Wholphin restores state to
_previous_ page, not playback since restoring playback is complex.
Before this PR, the back stack was maintained by Compose's
`rememberSerializable` and would be restored _after_ the
`PlaybackLifecycleObserver` cleans up the playback destination.

This meant that the app would be restored, from scratch, to the playback
page. The `PlaybackViewModel` would be initialized from scratch as it
was originally called, ie play from beginning.

The fix is to save and restore the back stack outside of Compose.

### Related issues
Fixes #767

### Testing
Emulator & nvidia shield

## Screenshots
N/A

## AI or LLM usage
None
2026-03-18 18:09:13 -04:00
..
config Add experimental MPV player backend (#161) 2025-11-16 18:46:25 -05:00
schemas/com.github.damontecres.wholphin.data.AppDatabase Add ability to order navigation drawer items (#886) 2026-02-12 19:55:12 -05:00
src Fix issues when the system kills the app during playback (#1116) 2026-03-18 18:09:13 -04:00
.gitignore Set update URL (#8) 2025-10-15 17:17:16 -04:00
build.gradle.kts Revert "Integrate with libass-android to support SSA/ASS subtitles in ExoPlayer" (#1051) 2026-03-06 16:16:12 -05:00
proguard-rules.pro Enable minify/proguard (#29) 2025-10-17 19:44:36 -04:00