[Android] Storages: set databinding item sooner

Geoffrey Métais git at videolan.org
Wed Feb 27 17:11:49 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 27 17:10:03 2019 +0100| [2f15436a845d5a2f4a2131ffcfa8453aeec1525d] | committer: Geoffrey Métais

Storages: set databinding item sooner

> https://code.videolan.org/videolan/vlc-android/commit/2f15436a845d5a2f4a2131ffcfa8453aeec1525d
---

 vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
index 51041ce88..fed34e5c3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
@@ -55,10 +55,10 @@ internal class StorageBrowserAdapter(fragment: StorageBrowserFragment) : BaseBro
             if (storage?.itemType == MediaLibraryItem.TYPE_MEDIA) storage = Storage((storage as MediaWrapper).uri)
             var storagePath = (storage as Storage).uri.path
             if (!storagePath.endsWith("/")) storagePath += "/"
+            vh.binding.item = storage
             job?.join()
             val hasContextMenu = customDirsLocation.contains(storagePath)
             val checked = (fragment as StorageBrowserFragment).mScannedDirectory || mediaDirsLocation.containsPath(storagePath)
-            vh.binding.setItem(storage)
             vh.binding.hasContextMenu = hasContextMenu
             when {
                 checked -> vh.binding.browserCheckbox.state = ThreeStatesCheckbox.STATE_CHECKED



More information about the Android mailing list