From 576f2a431a92a8e5b39f53416f5cbe9ce27d0243 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 1 Apr 2017 19:31:11 +0200 Subject: [PATCH] use Subsampling at a couple more image formats --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 2 +- .../main/kotlin/com/simplemobiletools/gallery/models/Medium.kt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index de24dccad..6a0f3b903 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -186,7 +186,7 @@ class PhotoFragment : ViewPagerFragment() { } private fun addZoomableView() { - if ((medium.isJpg() || medium.isPng()) && isMenuVisible && view.subsampling_view.visibility == View.GONE) { + if ((medium.isImage()) && isMenuVisible && view.subsampling_view.visibility == View.GONE) { view.subsampling_view.apply { beVisible() setDoubleTapZoomScale(1.4f) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt index 9c1bf6d17..d33f51d19 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/models/Medium.kt @@ -20,8 +20,6 @@ data class Medium(val name: String, var path: String, val isVideo: Boolean, val fun isGif() = path.isGif() - fun isJpg() = !isPng() && !isGif() - fun isImage() = !isGif() && !isVideo fun getMimeType() = File(path).getMimeType()