From ba9cfd867c028551c0b0740922c5130b14455c9f Mon Sep 17 00:00:00 2001 From: Maddie Witman Date: Fri, 22 Mar 2024 21:10:18 -0400 Subject: [PATCH] Migrated from Accompanist Webview to KevinZou WebView (#569) * Migrated from Accompanist Webview to KevinZou WebView to preempt deprecation * Removed old webview from version library --- app/build.gradle.kts | 3 ++- .../presentation/webview/WebViewScreenContent.kt | 10 +++++----- gradle/compose.versions.toml | 1 - gradle/libs.versions.toml | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8b63752a0..59750e53b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -161,7 +161,6 @@ dependencies { debugImplementation(compose.ui.tooling) implementation(compose.ui.tooling.preview) implementation(compose.ui.util) - implementation(compose.accompanist.webview) implementation(compose.accompanist.systemuicontroller) implementation(androidx.paging.runtime) @@ -237,6 +236,8 @@ dependencies { implementation(libs.bundles.voyager) implementation(libs.compose.materialmotion) implementation(libs.swipe) + implementation(libs.compose.webview) + // Logging implementation(libs.logcat) diff --git a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt index f1779da58..508790fff 100644 --- a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt +++ b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt @@ -28,11 +28,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.unit.dp -import com.google.accompanist.web.AccompanistWebViewClient -import com.google.accompanist.web.LoadingState -import com.google.accompanist.web.WebView -import com.google.accompanist.web.rememberWebViewNavigator -import com.google.accompanist.web.rememberWebViewState +import com.kevinnzou.web.AccompanistWebViewClient +import com.kevinnzou.web.LoadingState +import com.kevinnzou.web.WebView +import com.kevinnzou.web.rememberWebViewNavigator +import com.kevinnzou.web.rememberWebViewState import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.AppBarActions import eu.kanade.presentation.components.WarningBanner diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 5b629ff6f..b37960e0a 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -23,5 +23,4 @@ material-core = { module = "androidx.compose.material:material" } glance = "androidx.glance:glance-appwidget:1.0.0" -accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" } accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a82efa20f..affef4ac6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -63,6 +63,7 @@ photoview = "com.github.chrisbanes:PhotoView:2.3.0" directionalviewpager = "com.github.tachiyomiorg:DirectionalViewPager:1.0.0" insetter = "dev.chrisbanes.insetter:insetter:0.6.1" compose-materialmotion = "io.github.fornewid:material-motion-compose-core:1.2.0" +compose-webview = "io.github.kevinnzou:compose-webview:0.33.4" swipe = "me.saket.swipe:swipe:1.3.0"