From 07e4b5f3853eefbee1bac98f0bc0e6d85306d0be Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Wed, 4 Oct 2023 12:51:08 -0600 Subject: [PATCH] switch to the official FlowRow composable --- app/build.gradle.kts | 1 - .../ui/account/activity/AccountActivityBadges.kt | 11 ++++++----- gradle/libs.versions.toml | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d284f0d21c..2e25486a9a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -204,7 +204,6 @@ dependencies { implementation(libs.godtoolsShared.common) api(libs.eventbus) - implementation(libs.accompanist.flowlayout) implementation(libs.coil.compose) implementation(libs.compose.reorderable) implementation(libs.hilt) diff --git a/app/src/main/kotlin/org/cru/godtools/ui/account/activity/AccountActivityBadges.kt b/app/src/main/kotlin/org/cru/godtools/ui/account/activity/AccountActivityBadges.kt index 8bc0432a83..db70c8d24d 100644 --- a/app/src/main/kotlin/org/cru/godtools/ui/account/activity/AccountActivityBadges.kt +++ b/app/src/main/kotlin/org/cru/godtools/ui/account/activity/AccountActivityBadges.kt @@ -2,7 +2,10 @@ package org.cru.godtools.ui.account.activity import androidx.compose.foundation.Image import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -25,8 +28,6 @@ import androidx.compose.ui.text.ParagraphStyle import androidx.compose.ui.text.style.LineBreak import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import com.google.accompanist.flowlayout.FlowRow -import com.google.accompanist.flowlayout.SizeMode import org.ccci.gto.android.common.androidx.compose.foundation.text.minLinesHeight import org.ccci.gto.android.common.androidx.compose.material3.isLight import org.ccci.gto.android.common.androidx.compose.ui.text.computeHeightForDefaultText @@ -40,6 +41,7 @@ import org.cru.godtools.shared.user.activity.model.UserActivity private val BADGE_SIZE = 48.dp @Composable +@OptIn(ExperimentalLayoutApi::class) internal fun AccountActivityBadges( activity: UserActivity, modifier: Modifier = Modifier @@ -50,9 +52,8 @@ internal fun AccountActivityBadges( ) FlowRow( - mainAxisSize = SizeMode.Wrap, - mainAxisSpacing = 16.dp, - crossAxisSpacing = 16.dp, + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp), modifier = Modifier .padding(top = 16.dp) .fillMaxWidth() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fb0bf9e0b2..437acc7faa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -32,7 +32,6 @@ scarlet = "0.1.12" splitties = "3.0.0" [libraries] -accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" } accompanist-pager-indicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanist" } advrecyclerview = "com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0" android-desugaring = "com.android.tools:desugar_jdk_libs:2.0.3"