Commit 569595c3 authored by Geoffrey Métais's avatar Geoffrey Métais

Hide progress bar when progress is null

parent 3c969c1b
......@@ -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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment