[Android] Avoid relaunching scan on resume when alreday started
Nicolas Pomepuy
git at videolan.org
Wed Dec 15 07:08:34 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Dec 15 07:37:47 2021 +0100| [6203663d5ec7cbf72151c703c6d10198151457c8] | committer: Nicolas Pomepuy
Avoid relaunching scan on resume when alreday started
Fixes #2271
> https://code.videolan.org/videolan/vlc-android/commit/6203663d5ec7cbf72151c703c6d10198151457c8
---
application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
index 831975cd3..2a5876c15 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
@@ -125,7 +125,7 @@ class MainActivity : ContentActivity(),
super.onStart()
if (mediaLibrary.isInitiated) {
/* Load media items from database and storage */
- if (scanNeeded && Permissions.canReadStorage(this)) this.reloadLibrary()
+ if (scanNeeded && Permissions.canReadStorage(this) && !mediaLibrary.isWorking) this.reloadLibrary()
}
}
More information about the Android
mailing list