diff --git a/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerViewModel.kt b/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerViewModel.kt index 4b7c080..ec8a9f4 100644 --- a/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerViewModel.kt +++ b/app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerViewModel.kt @@ -204,7 +204,7 @@ class PlayerViewModel( } fun updateChapter(index: Long) { - if (chapters.isEmpty()) return + if (chapters.isEmpty() || index == -1L) return _currentChapter.update { chapters[index.toInt()] } }