## Description Fixes a crash that could occur during the beginning of playback Also adds better handling for clicking next extremely fast ### Technical details The playlist objects would be created on the IO thread and it had a `mutableIntStateOf` to track the current index. This meant that there is a race conditions for the IO thread to commit the snapshot for the main thread to see them. If the main thread is faster, it will crash. To fix that, this PR moves the mutable state in `Playlist` into the `PlaybackState` flow in the view model. This enures both the background threads and re-compositions have the right state. ### Related issues Fixes #1509 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None |
||
|---|---|---|
| .. | ||
| config | ||
| schemas/com.github.damontecres.wholphin.data.AppDatabase | ||
| src | ||
| .gitignore | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||