mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
catch exceptions thrown at storing media in a db
This commit is contained in:
parent
a830cc00ce
commit
83def1d288
1 changed files with 4 additions and 1 deletions
|
@ -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 }
|
||||
try {
|
||||
mMediumDao.insertAll(mediaToInsert)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue