add another extra check to avoid showing duplicate folders
This commit is contained in:
parent
9aade59c07
commit
db278b4aa2
1 changed files with 3 additions and 1 deletions
|
@ -679,7 +679,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showSortedDirs(dirs: ArrayList<Directory>) {
|
private fun showSortedDirs(dirs: ArrayList<Directory>) {
|
||||||
val sortedDirs = getSortedDirectories(dirs).clone() as ArrayList<Directory>
|
var sortedDirs = getSortedDirectories(dirs).clone() as ArrayList<Directory>
|
||||||
|
sortedDirs = sortedDirs.distinctBy { it.path.toLowerCase() } as ArrayList<Directory>
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
(directories_grid.adapter as DirectoryAdapter).updateDirs(sortedDirs)
|
(directories_grid.adapter as DirectoryAdapter).updateDirs(sortedDirs)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue