Update dependencies, fix covers restoring

master
Koitharu 2 years ago
parent b036a8ed94
commit 38b342b721
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -16,8 +16,8 @@ android {
applicationId 'org.koitharu.kotatsu' applicationId 'org.koitharu.kotatsu'
minSdk = 21 minSdk = 21
targetSdk = 35 targetSdk = 35
versionCode = 679 versionCode = 680
versionName = '7.6.6' versionName = '7.6.7'
generatedDensities = [] generatedDensities = []
testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner' testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner'
ksp { ksp {
@ -82,7 +82,7 @@ afterEvaluate {
} }
} }
dependencies { dependencies {
implementation('com.github.KotatsuApp:kotatsu-parsers:4c5ed57958') { implementation('com.github.KotatsuApp:kotatsu-parsers:f80b586081') {
exclude group: 'org.json', module: 'json' exclude group: 'org.json', module: 'json'
} }
@ -93,7 +93,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.activity:activity-ktx:1.9.3' 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.transition:transition-ktx:1.5.1'
implementation 'androidx.collection:collection-ktx:1.4.4' implementation 'androidx.collection:collection-ktx:1.4.4'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6'

@ -2,11 +2,8 @@ package org.koitharu.kotatsu.main.domain
import androidx.collection.ArraySet import androidx.collection.ArraySet
import coil.intercept.Interceptor import coil.intercept.Interceptor
import coil.network.HttpException
import coil.request.ErrorResult import coil.request.ErrorResult
import coil.request.ImageResult import coil.request.ImageResult
import okio.FileNotFoundException
import org.jsoup.HttpStatusException
import org.koitharu.kotatsu.bookmarks.domain.Bookmark import org.koitharu.kotatsu.bookmarks.domain.Bookmark
import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository
import org.koitharu.kotatsu.core.model.findById 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.parser.MangaRepository
import org.koitharu.kotatsu.core.util.ext.ifNullOrEmpty import org.koitharu.kotatsu.core.util.ext.ifNullOrEmpty
import org.koitharu.kotatsu.core.util.ext.printStackTraceDebug 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.model.Manga
import org.koitharu.kotatsu.parsers.util.runCatchingCancellable import org.koitharu.kotatsu.parsers.util.runCatchingCancellable
import java.net.UnknownHostException
import java.util.Collections import java.util.Collections
import javax.inject.Inject import javax.inject.Inject
import javax.net.ssl.SSLException
class CoverRestoreInterceptor @Inject constructor( class CoverRestoreInterceptor @Inject constructor(
private val dataRepository: MangaDataRepository, private val dataRepository: MangaDataRepository,
@ -116,11 +110,6 @@ class CoverRestoreInterceptor @Inject constructor(
} }
private fun Throwable.shouldRestore(): Boolean { private fun Throwable.shouldRestore(): Boolean {
return this is HttpException return this is Exception // any Exception but not Error
|| this is HttpStatusException
|| this is SSLException
|| this is ParseException
|| this is UnknownHostException
|| this is FileNotFoundException
} }
} }

Loading…
Cancel
Save