mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-21 22:15:33 +01:00
catch exceptions thrown at storing media in a db
This commit is contained in:
parent
a830cc00ce
commit
83def1d288
@ -824,7 +824,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||
mLatestMediaDateId = getLatestMediaByDateId()
|
||||
if (!isFromCache) {
|
||||
val mediaToInsert = (mMedia).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium }
|
||||
mMediumDao.insertAll(mediaToInsert)
|
||||
try {
|
||||
mMediumDao.insertAll(mediaToInsert)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user