diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 90ecac850..56f7c77db 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,6 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.android.application") @@ -245,7 +246,6 @@ dependencies { // Image loading implementation(libs.bundles.coil) - implementation(libs.subsamplingscaleimageview) { exclude(module = "image-decoder") } @@ -310,7 +310,7 @@ tasks { } } - withType().configureEach { + withType().configureEach { exclude { it.file.path.contains("generated[\\\\/]".toRegex()) } } diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt index f8f156258..b56d3aa8c 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -122,7 +122,6 @@ fun ExtensionDetailsScreen( ) }, ) { paddingValues -> - if (state.extension == null) { EmptyScreen( textResource = R.string.empty_screen, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt index d8a04ad99..13b197970 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt @@ -105,9 +105,7 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { ) pager.tapListener = { event -> val pos = PointF(event.rawX / pager.width, event.rawY / pager.height) - val navigator = config.navigator - - when (navigator.getAction(pos)) { + when (config.navigator.getAction(pos)) { NavigationRegion.MENU -> activity.toggleMenu() NavigationRegion.NEXT -> moveToNext() NavigationRegion.PREV -> moveToPrevious() @@ -274,7 +272,6 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { * Sets the active [chapters] on this pager. */ private fun setChaptersInternal(chapters: ViewerChapters) { - logcat { "setChaptersInternal" } val forceTransition = config.alwaysShowChapterTransition || adapter.items.getOrNull(pager.currentItem) is ChapterTransition adapter.setChapters(chapters, forceTransition) @@ -291,7 +288,6 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { * Tells this viewer to move to the given [page]. */ override fun moveToPage(page: ReaderPage) { - logcat { "moveToPage ${page.number}" } val position = adapter.items.indexOf(page) if (position != -1) { val currentPosition = pager.currentItem diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt index 8927479b7..e61810a3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt @@ -85,7 +85,7 @@ class WebtoonPageHolder( /** * Subscription used to read the header of the image. This is needed in order to instantiate - * the appropiate image view depending if the image is animated (GIF). + * the appropriate image view depending if the image is animated (GIF). */ private var readImageHeaderSubscription: Subscription? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt index 5e81ec7a9..aba636161 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt @@ -40,11 +40,6 @@ class WebtoonRecyclerView @JvmOverloads constructor( var tapListener: ((MotionEvent) -> Unit)? = null var longTapListener: ((MotionEvent) -> Boolean)? = null - init { - isVerticalScrollBarEnabled = false - isHorizontalScrollBarEnabled = false - } - override fun onMeasure(widthSpec: Int, heightSpec: Int) { halfWidth = MeasureSpec.getSize(widthSpec) / 2 halfHeight = MeasureSpec.getSize(heightSpec) / 2 @@ -226,8 +221,7 @@ class WebtoonRecyclerView @JvmOverloads constructor( } override fun onLongTapConfirmed(ev: MotionEvent) { - val listener = longTapListener - if (listener != null && listener.invoke(ev)) { + if (longTapListener?.invoke(ev) == true) { performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index f46c655d6..472acfbee 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -119,9 +119,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr ) recycler.tapListener = { event -> val pos = PointF(event.rawX / recycler.width, event.rawY / recycler.height) - val navigator = config.navigator - - when (navigator.getAction(pos)) { + when (config.navigator.getAction(pos)) { NavigationRegion.MENU -> activity.toggleMenu() NavigationRegion.NEXT, NavigationRegion.RIGHT -> scrollDown() NavigationRegion.PREV, NavigationRegion.LEFT -> scrollUp() @@ -245,7 +243,6 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr * Tells this viewer to set the given [chapters] as active. */ override fun setChapters(chapters: ViewerChapters) { - logcat { "setChapters" } val forceTransition = config.alwaysShowChapterTransition || currentPage is ChapterTransition adapter.setChapters(chapters, forceTransition) @@ -261,7 +258,6 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr * Tells this viewer to move to the given [page]. */ override fun moveToPage(page: ReaderPage) { - logcat { "moveToPage" } val position = adapter.items.indexOf(page) if (position != -1) { layoutManager.scrollToPositionWithOffset(position, 0)