mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fixing a crash at fetching deleted media from db
This commit is contained in:
@ -1109,9 +1109,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||
}
|
||||
|
||||
if (config.useRecycleBin) {
|
||||
val binFolder = dirs.firstOrNull { it.path == RECYCLE_BIN }
|
||||
if (binFolder != null && mMediumDao.getDeletedMedia().isEmpty()) {
|
||||
invalidDirs.add(binFolder)
|
||||
try {
|
||||
val binFolder = dirs.firstOrNull { it.path == RECYCLE_BIN }
|
||||
if (binFolder != null && mMediumDao.getDeletedMedia().isEmpty()) {
|
||||
invalidDirs.add(binFolder)
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user