mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-03 12:57:31 +01:00
properly catch exceptions thrown in the background
This commit is contained in:
parent
7605e90632
commit
150aace3ca
@ -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…
x
Reference in New Issue
Block a user