[Android] Hide progress bar when progress is null

Geoffrey Métais git at videolan.org
Wed Sep 19 17:43:45 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Sep 19 17:43:14 2018 +0200| [569595c35132eaf71e9a30d4878e1a954f3cfb83] | committer: Geoffrey Métais

Hide progress bar when progress is null

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

 .../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index d8b451fdc..36d09f205 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -373,7 +373,10 @@ public class AudioPlayerContainerActivity extends BaseActivity {
         MediaParsingService.Companion.getProgress().observe(this, new Observer<ScanProgress>() {
             @Override
             public void onChanged(@Nullable ScanProgress scanProgress) {
-                if (scanProgress == null || !Medialibrary.getInstance().isWorking()) return;
+                if (scanProgress == null || !Medialibrary.getInstance().isWorking()) {
+                    updateProgressVisibility(false);
+                    return;
+                }
                 updateProgressVisibility(true);
                 if (mScanProgressText != null) mScanProgressText.setText(scanProgress.getDiscovery());
                 if (mScanProgressBar != null) mScanProgressBar.setProgress(scanProgress.getParsing());



More information about the Android mailing list