From 6a54d42867114acd36ab3ba99762c520c11a49c3 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sun, 29 Sep 2024 19:43:09 +0300 Subject: [PATCH] Update SSIV --- app/build.gradle | 8 ++++---- .../org/koitharu/kotatsu/core/util/ext/Throwable.kt | 2 ++ .../kotatsu/settings/sources/catalog/SourceCatalogPage.kt | 2 +- .../kotatsu/settings/utils/PercentSummaryProvider.kt | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 760c4440c..0ba441866 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId 'org.koitharu.kotatsu' minSdk = 21 targetSdk = 35 - versionCode = 673 - versionName = '7.6' + versionCode = 674 + versionName = '7.6.1' generatedDensities = [] testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner' ksp { @@ -83,7 +83,7 @@ afterEvaluate { } dependencies { //noinspection GradleDependency - implementation('com.github.KotatsuApp:kotatsu-parsers:3cdd391410') { + implementation('com.github.KotatsuApp:kotatsu-parsers:1.1') { exclude group: 'org.json', module: 'json' } @@ -137,7 +137,7 @@ dependencies { implementation 'io.coil-kt:coil-base:2.7.0' implementation 'io.coil-kt:coil-svg:2.7.0' - implementation 'com.github.KotatsuApp:subsampling-scale-image-view:4ec7176962' + implementation 'com.github.KotatsuApp:subsampling-scale-image-view:b2c5a6d5ca' implementation 'com.github.solkin:disk-lru-cache:1.4' implementation 'io.noties.markwon:core:4.6.2' diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Throwable.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Throwable.kt index 060703b77..93c447518 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Throwable.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Throwable.kt @@ -4,6 +4,7 @@ import android.content.ActivityNotFoundException import android.content.res.Resources import androidx.annotation.DrawableRes import coil.network.HttpException +import com.davemorrissey.labs.subscaleview.decoder.ImageDecodeException import okio.FileNotFoundException import okio.IOException import okio.ProtocolException @@ -80,6 +81,7 @@ fun Throwable.getDisplayMessage(resources: Resources): String = when (this) { is UnknownHostException, is SocketTimeoutException -> resources.getString(R.string.network_error) + is ImageDecodeException -> resources.getString(R.string.error_corrupted_file) is NoDataReceivedException -> resources.getString(R.string.error_no_data_received) is IncompatiblePluginException -> resources.getString(R.string.plugin_incompatible) is WrongPasswordException -> resources.getString(R.string.wrong_password) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/catalog/SourceCatalogPage.kt b/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/catalog/SourceCatalogPage.kt index b129022db..55ca78aa3 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/catalog/SourceCatalogPage.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/catalog/SourceCatalogPage.kt @@ -13,7 +13,7 @@ data class SourceCatalogPage( return other is SourceCatalogPage && other.type == type } - override fun getChangePayload(previousState: ListModel): Any? { + override fun getChangePayload(previousState: ListModel): Any { return ListModelDiffCallback.PAYLOAD_NESTED_LIST_CHANGED } } diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/settings/utils/PercentSummaryProvider.kt b/app/src/main/kotlin/org/koitharu/kotatsu/settings/utils/PercentSummaryProvider.kt index 66e05e261..82b9ad561 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/settings/utils/PercentSummaryProvider.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/settings/utils/PercentSummaryProvider.kt @@ -7,7 +7,7 @@ class PercentSummaryProvider : Preference.SummaryProvider { private var percentPattern: String? = null - override fun provideSummary(preference: SliderPreference): CharSequence? { + override fun provideSummary(preference: SliderPreference): CharSequence { val pattern = percentPattern ?: preference.context.getString(R.string.percent_string_pattern).also { percentPattern = it }