Improve double-tap zoom in reader

This commit is contained in:
Koitharu
2024-06-22 10:20:48 +03:00
parent 8407a414c5
commit cfc3823593
4 changed files with 5 additions and 4 deletions

View File

@@ -136,7 +136,7 @@ dependencies {
implementation 'io.coil-kt:coil-base:2.6.0'
implementation 'io.coil-kt:coil-svg:2.6.0'
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:02e6d6cfe9'
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:8cafac256e'
implementation 'com.github.solkin:disk-lru-cache:1.4'
implementation 'io.noties.markwon:core:4.6.2'

View File

@@ -71,7 +71,7 @@ abstract class BasePageHolder<B : ViewBinding>(
}
protected fun SubsamplingScaleImageView.applyDownsampling(isForeground: Boolean) {
downsampling = when {
downSampling = when {
isForeground || !settings.isReaderOptimizationEnabled -> 1
context.isLowRamDevice() -> 8
else -> 4

View File

@@ -97,8 +97,8 @@ class WebtoonImageView @JvmOverloads constructor(
setMeasuredDimension(desiredWidth, desiredHeight)
}
override fun onDownsamplingChanged() {
super.onDownsamplingChanged()
override fun onDownSamplingChanged() {
super.onDownSamplingChanged()
post {
adjustScale()
}

View File

@@ -12,6 +12,7 @@
android:layout_height="match_parent"
android:defaultFocusHighlightEnabled="false"
android:focusable="true"
app:doubleTapZoomStyle="center"
app:restoreStrategy="deferred" />
<TextView