[Android] TV: Fix alpha sorting
Geoffrey Métais
git at videolan.org
Tue Jan 29 13:07:56 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 29 12:12:51 2019 +0100| [5b9e9e606af71e10c675fd890700fb53a0c90c65] | committer: Geoffrey Métais
TV: Fix alpha sorting
> https://code.videolan.org/videolan/vlc-android/commit/5b9e9e606af71e10c675fd890700fb53a0c90c65
---
vlc-android/src/org/videolan/vlc/util/ModelsHelper.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/util/ModelsHelper.kt b/vlc-android/src/org/videolan/vlc/util/ModelsHelper.kt
index 8022904c3..fe9665fc5 100644
--- a/vlc-android/src/org/videolan/vlc/util/ModelsHelper.kt
+++ b/vlc-android/src/org/videolan/vlc/util/ModelsHelper.kt
@@ -97,7 +97,9 @@ object ModelsHelper {
}
}
}
- array
+ if (sort == Medialibrary.SORT_DEFAULT || sort == Medialibrary.SORT_FILENAME || sort == Medialibrary.SORT_ALPHA)
+ array.toSortedMap()
+ else array
}
fun getHeader(context: Context, sort: Int, item: MediaLibraryItem, aboveItem: MediaLibraryItem?) = when (sort) {
More information about the Android
mailing list