adding some crashfixes
This commit is contained in:
parent
29f8f449b9
commit
bc3683deb9
3 changed files with 7 additions and 3 deletions
|
@ -693,7 +693,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
return false
|
||||
}
|
||||
|
||||
private fun getCurrentFragment() = (view_pager.adapter as MyPagerAdapter).getCurrentFragment(view_pager.currentItem)
|
||||
private fun getCurrentFragment() = (view_pager.adapter as? MyPagerAdapter)?.getCurrentFragment(view_pager.currentItem)
|
||||
|
||||
private fun showProperties() {
|
||||
if (getCurrentMedium() != null) {
|
||||
|
|
|
@ -623,7 +623,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||
try {
|
||||
val currMedia = mediumDao.getMediaFromPath(it)
|
||||
media.addAll(currMedia)
|
||||
} catch (ignored: IllegalStateException) {
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,11 @@ class NewPhotoFetcher : JobService() {
|
|||
addTriggerContentUri(JobInfo.TriggerContentUri(photoUri, JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS))
|
||||
addTriggerContentUri(JobInfo.TriggerContentUri(videoUri, JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS))
|
||||
addTriggerContentUri(JobInfo.TriggerContentUri(MEDIA_URI, 0))
|
||||
context.getSystemService(JobScheduler::class.java).schedule(build())
|
||||
|
||||
try {
|
||||
context.getSystemService(JobScheduler::class.java).schedule(build())
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue