mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
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>) {
|
||||
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 {
|
||||
(directories_grid.adapter as DirectoryAdapter).updateDirs(sortedDirs)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue