Commit ad406c79 authored by Geoffrey Métais's avatar Geoffrey Métais

Immediately show progress on activity display

parent e2a478f0
......@@ -2,8 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scan_progress_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/progress_layout_height"
android:visibility="gone">
android:layout_height="@dimen/progress_layout_height" >
<ProgressBar
android:id="@+id/scan_progress_bar"
android:layout_width="match_parent"
......
......@@ -55,7 +55,6 @@ import org.videolan.vlc.MediaParsingServiceKt;
import org.videolan.vlc.PlaybackService;
import org.videolan.vlc.R;
import org.videolan.vlc.ScanProgress;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.audio.AudioPlayer;
import org.videolan.vlc.gui.browser.StorageBrowserFragment;
import org.videolan.vlc.gui.helpers.BottomSheetBehavior;
......@@ -306,6 +305,11 @@ public class AudioPlayerContainerActivity extends BaseActivity {
}
} else if (mScanProgressLayout != null)
mScanProgressLayout.setVisibility(View.VISIBLE);
final ScanProgress sp = MediaParsingService.Companion.getProgress().getValue();
if (sp != null) {
if (mScanProgressText != null) mScanProgressText.setText(sp.getDiscovery());
if (mScanProgressBar != null) mScanProgressBar.setProgress(sp.getParsing());
}
}
protected void updateContainerPadding(boolean show) {
......
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