catch exceptions thrown at getting favorite paths
This commit is contained in:
parent
e31be23bf4
commit
54312adb75
|
@ -596,7 +596,13 @@ fun Context.updateDBDirectory(directory: Directory, directoryDao: DirectoryDao)
|
|||
directoryDao.updateDirectory(directory.path, directory.tmb, directory.mediaCnt, directory.modified, directory.taken, directory.size, directory.types)
|
||||
}
|
||||
|
||||
fun Context.getFavoritePaths() = galleryDB.MediumDao().getFavoritePaths() as ArrayList<String>
|
||||
fun Context.getFavoritePaths(): ArrayList<String> {
|
||||
return try {
|
||||
galleryDB.MediumDao().getFavoritePaths() as ArrayList<String>
|
||||
} catch (e: Exception) {
|
||||
ArrayList()
|
||||
}
|
||||
}
|
||||
|
||||
// remove the "recycle_bin" from the file path prefix, replace it with real bin path /data/user...
|
||||
fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList<Medium> {
|
||||
|
|
Loading…
Reference in New Issue