mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
feat(common): use FlowRow
from Compose Foundation
This commit is contained in:
parent
c3de960966
commit
250e7c20e5
3 changed files with 7 additions and 9 deletions
|
@ -35,7 +35,6 @@ dependencies {
|
|||
implementation(projects.core)
|
||||
implementation(projects.database)
|
||||
implementation(projects.model)
|
||||
implementation(libs.accompanist.flowlayout)
|
||||
implementation(libs.androidx.browser)
|
||||
implementation(libs.androidx.compose.animation)
|
||||
implementation(libs.androidx.compose.foundation)
|
||||
|
|
|
@ -14,6 +14,8 @@ import androidx.compose.foundation.combinedClickable
|
|||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.absoluteOffset
|
||||
|
@ -43,7 +45,6 @@ import androidx.compose.ui.semantics.Role
|
|||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.google.accompanist.flowlayout.FlowRow
|
||||
import dev.msfjarvis.claw.common.res.ClawIcons
|
||||
import dev.msfjarvis.claw.common.ui.NetworkImage
|
||||
import dev.msfjarvis.claw.database.local.SavedPost
|
||||
|
@ -202,16 +203,15 @@ private fun CommentsButton(
|
|||
}
|
||||
|
||||
@Composable
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
internal fun TagRow(
|
||||
tags: ImmutableList<String>,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
FlowRow(
|
||||
modifier = modifier,
|
||||
mainAxisSpacing = 8.dp,
|
||||
crossAxisSpacing = 8.dp,
|
||||
) {
|
||||
tags.forEach { tag -> TagText(tag) }
|
||||
FlowRow(verticalAlignment = Alignment.CenterVertically, modifier = modifier) {
|
||||
tags.forEach { tag ->
|
||||
TagText(tag = tag, modifier = Modifier.padding(end = 8.dp, top = 4.dp, bottom = 4.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ whetstone = "0.6.0-SNAPSHOT"
|
|||
workmanager = "2.8.1"
|
||||
|
||||
[libraries]
|
||||
accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" }
|
||||
accompanist-sysuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
|
||||
androidx-activity-compose = "androidx.activity:activity-compose:1.7.0"
|
||||
androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha13"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue