From 790d7b9170b61ccbde98e18069080efb8e6694b9 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 12 Feb 2022 11:23:10 -0500 Subject: [PATCH] Rename extension function to avoid confusion with androidx function --- .../kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt | 4 ++-- .../main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt index c138924bb..f60e91158 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt @@ -30,7 +30,7 @@ import com.github.chrisbanes.photoview.PhotoView import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonSubsamplingImageView import eu.kanade.tachiyomi.util.system.GLUtil import eu.kanade.tachiyomi.util.system.animatorDurationScale -import eu.kanade.tachiyomi.util.view.isVisible +import eu.kanade.tachiyomi.util.view.isVisibleOnScreen import java.io.InputStream import java.nio.ByteBuffer @@ -264,7 +264,7 @@ open class ReaderPageImageView @JvmOverloads constructor( object : SubsamplingScaleImageView.DefaultOnImageEventListener() { override fun onReady() { setupZoom(config) - if (isVisible()) landscapeZoom(true) + if (isVisibleOnScreen()) landscapeZoom(true) this@ReaderPageImageView.onImageLoaded() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt index 03e5a9d46..338ac8a79 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt @@ -262,7 +262,7 @@ inline fun T.copy(context: Context): T? { } } -fun View?.isVisible(): Boolean { +fun View?.isVisibleOnScreen(): Boolean { if (this == null) { return false }