mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 06:28: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
|
val adapter = view.directories_grid.adapter as? DirectoryAdapter
|
||||||
var dirsToShow = allDirectories
|
var dirsToShow = allDirectories
|
||||||
if (query.isNotEmpty()) {
|
if (query.isNotEmpty()) {
|
||||||
dirsToShow = dirsToShow.filter { it.name.contains(query, true) }.sortedBy { !it.name.startsWith(query, true) }
|
dirsToShow = dirsToShow.filter { it.name.contains(query, true) }.toMutableList() as ArrayList
|
||||||
.toMutableList() as ArrayList
|
|
||||||
}
|
}
|
||||||
|
dirsToShow = activity.getSortedDirectories(dirsToShow)
|
||||||
checkPlaceholderVisibility(dirsToShow)
|
checkPlaceholderVisibility(dirsToShow)
|
||||||
|
|
||||||
val filteredFolderListUpdated = adapter?.dirs != dirsToShow
|
val filteredFolderListUpdated = adapter?.dirs != dirsToShow
|
||||||
|
|
Loading…
Reference in a new issue