From 75a687138dd5f3b761255740254b11093d664638 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 1 Dec 2022 23:08:04 -0500 Subject: [PATCH] Migrate to Accompanist M3 theme adapter --- app/build.gradle.kts | 2 +- .../main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt | 2 +- gradle/compose.versions.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 63f16da0a..d2b80c48b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -172,7 +172,6 @@ dependencies { implementation(compose.activity) implementation(compose.foundation) implementation(compose.material3.core) - implementation(compose.material3.adapter) implementation(compose.material.core) implementation(compose.material.icons) implementation(compose.animation) @@ -183,6 +182,7 @@ dependencies { implementation(compose.accompanist.swiperefresh) implementation(compose.accompanist.flowlayout) implementation(compose.accompanist.permissions) + implementation(compose.accompanist.themeadapter) implementation(androidx.paging.runtime) implementation(androidx.paging.compose) diff --git a/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt b/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt index 1e092c657..4a9dd6dbb 100644 --- a/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt +++ b/app/src/main/java/eu/kanade/presentation/theme/TachiyomiTheme.kt @@ -6,7 +6,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalLayoutDirection -import com.google.android.material.composethemeadapter3.createMdc3Theme +import com.google.accompanist.themeadapter.material3.createMdc3Theme import eu.kanade.domain.ui.model.AppTheme import eu.kanade.tachiyomi.ui.base.delegate.ThemingDelegate import uy.kohesive.injekt.api.get diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 7f357024b..942962fc8 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,7 +1,7 @@ [versions] compiler = "1.4.0-alpha02" compose-bom = "2022.11.00" -accompanist = "0.27.1" +accompanist = "0.28.0" [libraries] activity = "androidx.activity:activity-compose:1.6.1" @@ -13,7 +13,6 @@ ui-tooling = { module = "androidx.compose.ui:ui-tooling" } ui-util = { module = "androidx.compose.ui:ui-util" } material3-core = { module = "androidx.compose.material3:material3" } -material3-adapter = "com.google.android.material:compose-theme-adapter-3:1.1.0" material-icons = { module = "androidx.compose.material:material-icons-extended" } # Here until M3's swipeable became public https://issuetracker.google.com/issues/234640556 @@ -23,3 +22,4 @@ accompanist-webview = { module = "com.google.accompanist:accompanist-webview", v accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" } accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" } accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" } +accompanist-themeadapter = { module = "com.google.accompanist:accompanist-themeadapter-material3", version.ref = "accompanist" } \ No newline at end of file