Compare commits

...

3 Commits

Author SHA1 Message Date
ef0cf4766a Fix webtoon mode 2023-11-29 18:07:53 +02:00
910069ec99 Update parsers 2023-11-29 17:25:13 +02:00
d56107bf1f Remove funding info 2023-11-29 09:53:23 +02:00
4 changed files with 7 additions and 22 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1,2 +0,0 @@
ko_fi: xtimms
custom: ["https://yoomoney.ru/to/410012543938752"]

View File

@@ -16,8 +16,8 @@ android {
applicationId 'org.koitharu.kotatsu'
minSdk = 21
targetSdk = 34
versionCode = 601
versionName = '6.4.1'
versionCode = 602
versionName = '6.4.2'
generatedDensities = []
testInstrumentationRunner "org.koitharu.kotatsu.HiltTestRunner"
ksp {
@@ -82,7 +82,7 @@ afterEvaluate {
}
dependencies {
//noinspection GradleDependency
implementation('com.github.KotatsuApp:kotatsu-parsers:3bb10ee948') {
implementation('com.github.KotatsuApp:kotatsu-parsers:0efd5437f9') {
exclude group: 'org.json', module: 'json'
}

View File

@@ -5,6 +5,7 @@ import android.view.View
import androidx.core.view.isVisible
import androidx.lifecycle.LifecycleOwner
import com.davemorrissey.labs.subscaleview.ImageSource
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
import org.koitharu.kotatsu.R
import org.koitharu.kotatsu.core.exceptions.resolve.ExceptionResolver
import org.koitharu.kotatsu.core.os.NetworkState
@@ -96,6 +97,9 @@ class WebtoonHolder(
override fun onImageShowing(settings: ReaderSettings) {
binding.ssiv.colorFilter = settings.colorFilter?.toColorFilter()
with(binding.ssiv) {
minimumScaleType = SubsamplingScaleImageView.SCALE_TYPE_CUSTOM
minScale = width / sWidth.toFloat()
maxScale = minScale
scrollTo(
when {
scrollToRestore != 0 -> scrollToRestore

View File

@@ -100,17 +100,6 @@ class WebtoonImageView @JvmOverloads constructor(
}
}
override fun onReady() {
super.onReady()
adjustScale()
}
override fun onDownsamplingChanged() {
super.onDownsamplingChanged()
adjustScale()
computeScrollRange()
}
private fun scrollToInternal(pos: Int) {
scrollPos = pos
ct.set(sWidth / 2f, (height / 2f + pos.toFloat()) / minScale)
@@ -128,10 +117,4 @@ class WebtoonImageView @JvmOverloads constructor(
private fun parentHeight(): Int {
return ancestors.firstNotNullOfOrNull { it as? RecyclerView }?.height ?: 0
}
private fun adjustScale() {
minScale = width / sWidth.toFloat()
maxScale = minScale
minimumScaleType = SCALE_TYPE_CUSTOM
}
}