[Android] Subtitle dialog: fix initial state set to error

Nicolas Pomepuy git at videolan.org
Thu Sep 29 13:23:35 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 29 07:46:33 2022 +0200| [a666e6917778925ce68fea2727f599a996d74a54] | committer: Duncan McNamara

Subtitle dialog: fix initial state set to error

Fixes #2696

> https://code.videolan.org/videolan/vlc-android/commit/a666e6917778925ce68fea2727f599a996d74a54
---

 .../org/videolan/vlc/gui/dialogs/SubtitleDownloaderDialogFragment.kt    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SubtitleDownloaderDialogFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SubtitleDownloaderDialogFragment.kt
index f11487059..966ecc9a5 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SubtitleDownloaderDialogFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SubtitleDownloaderDialogFragment.kt
@@ -90,7 +90,7 @@ class SubtitleDownloaderDialogFragment : VLCBottomSheetDialogFragment() {
     }
 
     override fun onResume() {
-        viewModel.onRefresh()
+        if (viewModel.isApiLoading.value == false) viewModel.onRefresh()
         super.onResume()
     }
 



More information about the Android mailing list