mirror of
				https://github.com/SimpleMobileTools/Simple-Gallery.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	show the current folder as an available option at grouping too, not just subfolders
This commit is contained in:
		| @@ -975,6 +975,16 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { | |||||||
|             val foldersToShow = getDirectParentSubfolders(dirFolders) |             val foldersToShow = getDirectParentSubfolders(dirFolders) | ||||||
|             val parentDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList<Directory> |             val parentDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList<Directory> | ||||||
|             updateSubfolderCounts(dirs, parentDirs) |             updateSubfolderCounts(dirs, parentDirs) | ||||||
|  |  | ||||||
|  |             // show the current folder as an available option too, not just subfolders | ||||||
|  |             if (mCurrentPathPrefix.isNotEmpty()) { | ||||||
|  |                 val currentFolder = mDirs.firstOrNull { parentDirs.firstOrNull { it.path == mCurrentPathPrefix } == null && it.path == mCurrentPathPrefix } | ||||||
|  |                 currentFolder?.apply { | ||||||
|  |                     subfoldersCount = 1 | ||||||
|  |                     parentDirs.add(this) | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |  | ||||||
|             parentDirs |             parentDirs | ||||||
|         } else { |         } else { | ||||||
|             dirs.forEach { it.subfoldersMediaCount = it.mediaCnt } |             dirs.forEach { it.subfoldersMediaCount = it.mediaCnt } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user