From 4fecbe259bb37aebc0f7e21fbc7629a361ef0ac3 Mon Sep 17 00:00:00 2001 From: GG Bond Date: Wed, 13 Dec 2023 11:31:56 +0800 Subject: [PATCH] Update compose snapshot, drop outdated workaround --- app/build.gradle.kts | 3 --- app/proguard-rules.pro | 5 ----- .../hippo/ehviewer/ui/screen/SearchBarScreen.kt | 15 --------------- settings.gradle.kts | 2 +- 4 files changed, 1 insertion(+), 24 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5b1323dd3..f7d2d9d4e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -271,9 +271,6 @@ dependencies { configurations.all { resolutionStrategy { - // Workaround IME won't show again once hidden. - // Google issue-tracker link? - force("androidx.compose.ui:ui-text-android:1.6.0-alpha08") exclude("androidx.navigation", "navigation-compose") } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 360512312..4acb4c7da 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -11,11 +11,6 @@ public static final ** CREATOR; } -# https://issuetracker.google.com/issues/307323842 --keepclassmembers class androidx.compose.ui.platform.WindowInfoImpl { - setWindowFocused(boolean); -} - # Ktor logger -dontwarn org.slf4j.impl.StaticLoggerBinder diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/SearchBarScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/SearchBarScreen.kt index 34df6a95c..521415e04 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/SearchBarScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/SearchBarScreen.kt @@ -62,7 +62,6 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.layout import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView -import androidx.compose.ui.platform.LocalWindowInfo import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -126,20 +125,6 @@ fun SearchBarScreen( val context = LocalContext.current val dialogState = LocalDialogState.current - // Workaround for BTF2 cursor not showing - // We can't use an always focused WindowInfo because callbacks won't be called once - // the window regained focus after losing it (e.g. showing a dialog on top of it) - // https://issuetracker.google.com/issues/307323842 - val windowInfo = LocalWindowInfo.current - remember { - val clazz = Class.forName("androidx.compose.ui.platform.WindowInfoImpl") - clazz.cast(windowInfo).let { - clazz.getDeclaredMethod("setWindowFocused", Boolean::class.javaPrimitiveType).apply { - invoke(it, true) - } - } - } - class TagSuggestion( override val hint: String?, override val keyword: String, diff --git a/settings.gradle.kts b/settings.gradle.kts index d5a20e1dc..68480440a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,7 +15,7 @@ dependencyResolutionManagement { maven("https://oss.sonatype.org/content/repositories/snapshots") maven("https://jitpack.io") maven("https://androidx.dev/storage/compose-compiler/repository/") - maven("https://androidx.dev/snapshots/builds/11206866/artifacts/repository") + maven("https://androidx.dev/snapshots/builds/11212115/artifacts/repository") } }