make sure the directories and distinct before sorting
This commit is contained in:
parent
f196158204
commit
66cd5dad3e
1 changed files with 2 additions and 2 deletions
|
@ -833,8 +833,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showSortedDirs(dirs: ArrayList<Directory>) {
|
private fun showSortedDirs(dirs: ArrayList<Directory>) {
|
||||||
var sortedDirs = getSortedDirectories(dirs)
|
var sortedDirs = dirs.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory>
|
||||||
sortedDirs = sortedDirs.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory>
|
sortedDirs = getSortedDirectories(sortedDirs)
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
(directories_grid.adapter as? DirectoryAdapter)?.updateDirs(sortedDirs)
|
(directories_grid.adapter as? DirectoryAdapter)?.updateDirs(sortedDirs)
|
||||||
|
|
Loading…
Reference in a new issue