catch exceptions thrown at getting recycle bin files in the settings

This commit is contained in:
tibbi 2019-03-09 21:59:35 +01:00
parent 23d6fd110d
commit 804eb08143

View file

@ -573,7 +573,10 @@ class SettingsActivity : SimpleActivity() {
private fun setupEmptyRecycleBin() {
Thread {
mRecycleBinContentSize = galleryDB.MediumDao().getDeletedMedia().sumByLong { it.size }
try {
mRecycleBinContentSize = galleryDB.MediumDao().getDeletedMedia().sumByLong { it.size }
} catch (ignored: Exception) {
}
runOnUiThread {
settings_empty_recycle_bin_size.text = mRecycleBinContentSize.formatSize()
}