catch exceptions thrown at getDeletedMediaCount()
This commit is contained in:
parent
f3eb312e57
commit
45cf8da60f
1 changed files with 10 additions and 7 deletions
|
@ -906,6 +906,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
val dateTakens = mLastMediaFetcher!!.getDateTakens()
|
||||
|
||||
if (config.showRecycleBinAtFolders && !config.showRecycleBinLast && !dirs.map { it.path }.contains(RECYCLE_BIN)) {
|
||||
try {
|
||||
if (mediaDB.getDeletedMediaCount() > 0) {
|
||||
val recycleBin = Directory().apply {
|
||||
path = RECYCLE_BIN
|
||||
|
@ -915,6 +916,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
|
||||
dirs.add(0, recycleBin)
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
if (dirs.map { it.path }.contains(FAVORITES)) {
|
||||
|
|
Loading…
Reference in a new issue