make sure only media files get deleted from the viewpager activity

This commit is contained in:
tibbi 2018-07-18 14:34:37 +02:00
parent 007d972787
commit 92718e5666

View file

@ -922,7 +922,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private fun deleteConfirmed() { private fun deleteConfirmed() {
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
if (getIsPathDirectory(path)) { if (getIsPathDirectory(path) || !path.isImageVideoGif()) {
return return
} }