[Android] Update the folder item when SD is unmounted / re-mounted
Nicolas Pomepuy
git at videolan.org
Mon May 15 12:09:55 UTC 2023
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Mar 15 15:29:49 2023 +0100| [89ab44f0b9913992c0c039b9e0b182c2edb8d6e5] | committer: Nicolas Pomepuy
Update the folder item when SD is unmounted / re-mounted
> https://code.videolan.org/videolan/vlc-android/commit/89ab44f0b9913992c0c039b9e0b182c2edb8d6e5
---
.../vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
index 36de0cca26..5d84a29516 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
@@ -49,7 +49,6 @@ import org.videolan.tools.MultiSelectAdapter
import org.videolan.tools.MultiSelectHelper
import org.videolan.vlc.BR
import org.videolan.vlc.R
-import org.videolan.vlc.gui.audio.AudioBrowserAdapter
import org.videolan.vlc.gui.helpers.*
import org.videolan.vlc.gui.view.FastScroller
import org.videolan.vlc.util.*
@@ -267,6 +266,7 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean
else if (oldItem is Folder && newItem is Folder) {
oldItem === newItem || (oldItem.title == newItem.title
&& oldItem.tracksCount == newItem.tracksCount
+ && oldItem.mMrl == newItem.mMrl
&& oldItem.isFavorite == newItem.isFavorite)
}
else oldItem.itemType == MediaLibraryItem.TYPE_FOLDER || (oldItem.itemType == MediaLibraryItem.TYPE_VIDEO_GROUP
@@ -276,6 +276,7 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean
override fun getChangePayload(oldItem: MediaLibraryItem, newItem: MediaLibraryItem) = when {
(oldItem is MediaWrapper && newItem is MediaWrapper) && oldItem.displayTime != newItem.displayTime -> UPDATE_TIME
(oldItem is VideoGroup && newItem is VideoGroup) -> UPDATE_VIDEO_GROUP
+ (oldItem is Folder && newItem is Folder) -> UPDATE_VIDEO_GROUP
oldItem.artworkMrl != newItem.artworkMrl -> UPDATE_THUMB
oldItem.isFavorite != newItem.isFavorite -> UPDATE_FAVORITE_STATE
else -> UPDATE_SEEN
More information about the Android
mailing list