From 740e370465444beaa52af7aae9016c9cf67cd066 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Fri, 23 Jun 2023 01:20:12 +0700 Subject: [PATCH] Bump compile SDK version 34 (#9625) --- .../tachiyomi/ui/reader/ReaderNavigationOverlayView.kt | 6 +++--- .../tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt | 2 +- buildSrc/src/main/kotlin/AndroidConfig.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderNavigationOverlayView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderNavigationOverlayView.kt index 6e17affc7..c7a283453 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderNavigationOverlayView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderNavigationOverlayView.kt @@ -58,21 +58,21 @@ class ReaderNavigationOverlayView(context: Context, attributeSet: AttributeSet) strokeWidth = 8f } - override fun onDraw(canvas: Canvas?) { + override fun onDraw(canvas: Canvas) { if (navigation == null) return navigation?.regions?.forEach { region -> val rect = region.rectF // Scale rect from 1f,1f to screen width and height - canvas?.withScale(width.toFloat(), height.toFloat()) { + canvas.withScale(width.toFloat(), height.toFloat()) { regionPaint.color = context.getColor(region.type.colorRes) drawRect(rect, regionPaint) } // Don't want scale anymore because it messes with drawText // Translate origin to rect start (left, top) - canvas?.withTranslation(x = (width * rect.left), y = (height * rect.top)) { + canvas.withTranslation(x = (width * rect.left), y = (height * rect.top)) { // Calculate center of rect width on screen val x = width * (abs(rect.left - rect.right) / 2) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt index 43c981b25..cedc45ab7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt @@ -75,7 +75,7 @@ class WebtoonFrame(context: Context) : FrameLayout(context) { } override fun onFling( - e1: MotionEvent, + e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float, diff --git a/buildSrc/src/main/kotlin/AndroidConfig.kt b/buildSrc/src/main/kotlin/AndroidConfig.kt index f0cf6fc23..f63c07729 100644 --- a/buildSrc/src/main/kotlin/AndroidConfig.kt +++ b/buildSrc/src/main/kotlin/AndroidConfig.kt @@ -1,5 +1,5 @@ object AndroidConfig { - const val compileSdk = 33 + const val compileSdk = 34 const val minSdk = 23 const val targetSdk = 29 const val ndk = "22.1.7171670"