use Subsampling at a couple more image formats

This commit is contained in:
tibbi 2017-04-01 19:31:11 +02:00
parent f7deafb2dc
commit 576f2a431a
2 changed files with 1 additions and 3 deletions

View file

@ -186,7 +186,7 @@ class PhotoFragment : ViewPagerFragment() {
} }
private fun addZoomableView() { 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 { view.subsampling_view.apply {
beVisible() beVisible()
setDoubleTapZoomScale(1.4f) setDoubleTapZoomScale(1.4f)

View file

@ -20,8 +20,6 @@ data class Medium(val name: String, var path: String, val isVideo: Boolean, val
fun isGif() = path.isGif() fun isGif() = path.isGif()
fun isJpg() = !isPng() && !isGif()
fun isImage() = !isGif() && !isVideo fun isImage() = !isGif() && !isVideo
fun getMimeType() = File(path).getMimeType() fun getMimeType() = File(path).getMimeType()