From 38b342b721fbf74697ebbe309da1f6170a1e6ebe Mon Sep 17 00:00:00 2001 From: Koitharu Date: Mon, 4 Nov 2024 15:41:16 +0200 Subject: [PATCH] Update dependencies, fix covers restoring --- app/build.gradle | 8 ++++---- .../kotatsu/main/domain/CoverRestoreInterceptor.kt | 13 +------------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c2923127b..32e4e1e9f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId 'org.koitharu.kotatsu' minSdk = 21 targetSdk = 35 - versionCode = 679 - versionName = '7.6.6' + versionCode = 680 + versionName = '7.6.7' generatedDensities = [] testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner' ksp { @@ -82,7 +82,7 @@ afterEvaluate { } } dependencies { - implementation('com.github.KotatsuApp:kotatsu-parsers:4c5ed57958') { + implementation('com.github.KotatsuApp:kotatsu-parsers:f80b586081') { exclude group: 'org.json', module: 'json' } @@ -93,7 +93,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.activity:activity-ktx:1.9.3' - implementation 'androidx.fragment:fragment-ktx:1.8.4' + implementation 'androidx.fragment:fragment-ktx:1.8.5' implementation 'androidx.transition:transition-ktx:1.5.1' implementation 'androidx.collection:collection-ktx:1.4.4' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6' diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/main/domain/CoverRestoreInterceptor.kt b/app/src/main/kotlin/org/koitharu/kotatsu/main/domain/CoverRestoreInterceptor.kt index 9f27b6147..5b0264d78 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/main/domain/CoverRestoreInterceptor.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/main/domain/CoverRestoreInterceptor.kt @@ -2,11 +2,8 @@ package org.koitharu.kotatsu.main.domain import androidx.collection.ArraySet import coil.intercept.Interceptor -import coil.network.HttpException import coil.request.ErrorResult import coil.request.ImageResult -import okio.FileNotFoundException -import org.jsoup.HttpStatusException import org.koitharu.kotatsu.bookmarks.domain.Bookmark import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository import org.koitharu.kotatsu.core.model.findById @@ -15,13 +12,10 @@ import org.koitharu.kotatsu.core.parser.MangaDataRepository import org.koitharu.kotatsu.core.parser.MangaRepository import org.koitharu.kotatsu.core.util.ext.ifNullOrEmpty import org.koitharu.kotatsu.core.util.ext.printStackTraceDebug -import org.koitharu.kotatsu.parsers.exception.ParseException import org.koitharu.kotatsu.parsers.model.Manga import org.koitharu.kotatsu.parsers.util.runCatchingCancellable -import java.net.UnknownHostException import java.util.Collections import javax.inject.Inject -import javax.net.ssl.SSLException class CoverRestoreInterceptor @Inject constructor( private val dataRepository: MangaDataRepository, @@ -116,11 +110,6 @@ class CoverRestoreInterceptor @Inject constructor( } private fun Throwable.shouldRestore(): Boolean { - return this is HttpException - || this is HttpStatusException - || this is SSLException - || this is ParseException - || this is UnknownHostException - || this is FileNotFoundException + return this is Exception // any Exception but not Error } }