mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
properly catch exceptions thrown in the background
This commit is contained in:
parent
7605e90632
commit
150aace3ca
1 changed files with 5 additions and 5 deletions
|
@ -872,12 +872,12 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
mLatestMediaDateId = getLatestMediaByDateId()
|
||||
if (!isFromCache) {
|
||||
val mediaToInsert = (mMedia).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium }
|
||||
try {
|
||||
Thread {
|
||||
Thread {
|
||||
try {
|
||||
mediaDB.insertAll(mediaToInsert)
|
||||
}.start()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue