mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
adding some recycle bin refreshing related improvements
This commit is contained in:
@ -942,6 +942,16 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
val lastModifieds = mLastMediaFetcher!!.getLastModifieds()
|
||||
val dateTakens = mLastMediaFetcher!!.getDateTakens()
|
||||
|
||||
if (config.showRecycleBinAtFolders && !config.showRecycleBinLast && !dirs.map { it.path }.contains(RECYCLE_BIN)) {
|
||||
val recycleBin = Directory().apply {
|
||||
path = RECYCLE_BIN
|
||||
name = getString(R.string.recycle_bin)
|
||||
location = LOCATION_INTERNAL
|
||||
}
|
||||
|
||||
dirs.add(0, recycleBin)
|
||||
}
|
||||
|
||||
try {
|
||||
for (directory in dirs) {
|
||||
if (mShouldStopFetching || isDestroyed || isFinishing) {
|
||||
@ -1044,7 +1054,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
foldersToScan.remove(RECYCLE_BIN)
|
||||
}
|
||||
|
||||
dirs.forEach {
|
||||
dirs.filterNot { it.path == RECYCLE_BIN }.forEach {
|
||||
foldersToScan.remove(it.path)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user