[Android] Subtitle Downloader: Prevent to reset Data when isChecked is not changed
Habib Kazemi
git at videolan.org
Mon Dec 10 18:49:37 CET 2018
vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Sun Dec 9 22:45:06 2018 +0330| [7cb481883a3f193f519277872889bfc0a51aab71] | committer: Geoffrey Métais
Subtitle Downloader: Prevent to reset Data when isChecked is not changed
Fix #685
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> https://code.videolan.org/videolan/vlc-android/commit/7cb481883a3f193f519277872889bfc0a51aab71
---
vlc-android/src/org/videolan/vlc/viewmodels/SubtitlesModel.kt | 1 +
1 file changed, 1 insertion(+)
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/SubtitlesModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/SubtitlesModel.kt
index 240bc1f42..7f205b62f 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/SubtitlesModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/SubtitlesModel.kt
@@ -98,6 +98,7 @@ class SubtitlesModel(private val context: Context, private val mediaPath: String
}
fun onCheckedChanged(isChecked: Boolean) {
+ if (manualSearchEnabled.get() == isChecked) return
manualSearchEnabled.set(isChecked)
isApiLoading.set(false)
apiResultLiveData.postValue(listOf())
More information about the Android
mailing list