diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 21db92f18f..80799c1ce7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -91,7 +91,6 @@ android { dependencies { // Modified dependencies implementation("com.github.jays2kings:subsampling-scale-image-view:dfd3e43") - implementation("com.github.inorichi:junrar-android:634c1f5") // Source models and interfaces from Tachiyomi 1.x implementation("tachiyomi.sourceapi:source-api:1.1") diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt index 9a6a6b88c6..01c7a632e0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt @@ -1,11 +1,11 @@ package eu.kanade.tachiyomi.ui.reader.loader +import com.github.junrar.Archive +import com.github.junrar.rarfile.FileHeader import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.ui.reader.model.ReaderPage import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder import eu.kanade.tachiyomi.util.system.ImageUtil -import junrar.Archive -import junrar.rarfile.FileHeader import rx.Observable import java.io.File import java.io.InputStream @@ -43,8 +43,8 @@ class RarPageLoader(file: File) : PageLoader() { */ override fun getPages(): Observable> { return archive.fileHeaders - .filter { !it.isDirectory && ImageUtil.isImage(it.fileNameString) { archive.getInputStream(it) } } - .sortedWith(Comparator { f1, f2 -> f1.fileNameString.compareToCaseInsensitiveNaturalOrder(f2.fileNameString) }) + .filter { !it.isDirectory && ImageUtil.isImage(it.fileName) { archive.getInputStream(it) } } + .sortedWith { f1, f2 -> f1.fileName.compareToCaseInsensitiveNaturalOrder(f2.fileName) } .mapIndexed { i, header -> val streamFn = { getStream(header) }