diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 4242213..5b87d41 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,5 +19,6 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile +-dontobfuscate -keep,allowoptimization class is.xyz.mpv.** { public protected *; } -keep,allowoptimization class com.arthenica.** { public protected *; } \ No newline at end of file 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 e4f489f..1ebca41 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,6 +204,7 @@ class PlayerViewModel( } fun updateChapter(index: Long) { + if (chapters.isEmpty()) return _currentChapter.update { chapters[index.toInt()] } }