[Android] FileBrowser: change default sort to filename
Duncan McNamara
git at videolan.org
Tue Jun 7 08:00:51 UTC 2022
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue May 31 11:36:07 2022 +0200| [2da644e8f6389f23a99f53c1ec85aca02fbc2089] | committer: Nicolas Pomepuy
FileBrowser: change default sort to filename
As it is the order returned by libvlc, and filebrowser displays
filenames and not track names, the default sort should be filename and
not track name.
> https://code.videolan.org/videolan/vlc-android/commit/2da644e8f6389f23a99f53c1ec85aca02fbc2089
---
application/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
index d4c0d05a7..e6b01a1cf 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
@@ -603,9 +603,9 @@ object UiTools {
val sort = model.sort
val desc = model.desc
var item: MenuItem? = menu.findItem(R.id.ml_menu_sortby_name)
- item?.title = "${sortable.requireContext().getString(R.string.sortby_name)} ${if (sort == Medialibrary.SORT_ALPHA || sort == Medialibrary.SORT_DEFAULT) if (!desc) "▼" else "▲" else ""}"
+ item?.title = "${sortable.requireContext().getString(R.string.sortby_name)} ${if (sort == Medialibrary.SORT_ALPHA) if (!desc) "▼" else "▲" else ""}"
item = menu.findItem(R.id.ml_menu_sortby_filename)
- item?.title = "${sortable.requireContext().getString(R.string.sortby_filename)} ${if (sort == Medialibrary.SORT_FILENAME) if (!desc) "▼" else "▲" else ""}"
+ item?.title = "${sortable.requireContext().getString(R.string.sortby_filename)} ${if (sort == Medialibrary.SORT_FILENAME || sort == Medialibrary.SORT_DEFAULT) if (!desc) "▼" else "▲" else ""}"
item = menu.findItem(R.id.ml_menu_sortby_artist_name)
item?.title = "${sortable.requireContext().getString(R.string.sortby_artist_name)} ${if (sort == Medialibrary.SORT_ARTIST) if (!desc) "▼" else "▲" else ""}"
item = menu.findItem(R.id.ml_menu_sortby_album_name)
More information about the Android
mailing list