sort search results on folder picker dialog respecting to config.directorySorting
This commit is contained in:
parent
343962bfca
commit
7f88bb8795
|
@ -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 New Issue