mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
sort search results on folder picker dialog respecting to config.directorySorting
This commit is contained in:
parent
343962bfca
commit
7f88bb8795
1 changed files with 2 additions and 2 deletions
|
@ -126,9 +126,9 @@ class PickDirectoryDialog(
|
|||
val adapter = view.directories_grid.adapter as? DirectoryAdapter
|
||||
var dirsToShow = allDirectories
|
||||
if (query.isNotEmpty()) {
|
||||
dirsToShow = dirsToShow.filter { it.name.contains(query, true) }.sortedBy { !it.name.startsWith(query, true) }
|
||||
.toMutableList() as ArrayList
|
||||
dirsToShow = dirsToShow.filter { it.name.contains(query, true) }.toMutableList() as ArrayList
|
||||
}
|
||||
dirsToShow = activity.getSortedDirectories(dirsToShow)
|
||||
checkPlaceholderVisibility(dirsToShow)
|
||||
|
||||
val filteredFolderListUpdated = adapter?.dirs != dirsToShow
|
||||
|
|
Loading…
Reference in a new issue