mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 14:07:05 +05:30
fix(common): adopt new Compose APIs
This commit is contained in:
parent
6750eff9fa
commit
fb4beb08ee
4 changed files with 6 additions and 6 deletions
|
@ -22,7 +22,6 @@ dependencies {
|
||||||
implementation(projects.core)
|
implementation(projects.core)
|
||||||
implementation(projects.database)
|
implementation(projects.database)
|
||||||
implementation(projects.model)
|
implementation(projects.model)
|
||||||
implementation(libs.accompanist.flowlayout)
|
|
||||||
implementation(libs.androidx.browser)
|
implementation(libs.androidx.browser)
|
||||||
implementation(libs.androidx.compose.animation)
|
implementation(libs.androidx.compose.animation)
|
||||||
implementation(libs.androidx.compose.foundation)
|
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.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
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.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.absoluteOffset
|
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.AnnotatedString
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.google.accompanist.flowlayout.FlowRow
|
|
||||||
import dev.msfjarvis.claw.common.res.ClawIcons
|
import dev.msfjarvis.claw.common.res.ClawIcons
|
||||||
import dev.msfjarvis.claw.common.ui.NetworkImage
|
import dev.msfjarvis.claw.common.ui.NetworkImage
|
||||||
import dev.msfjarvis.claw.database.local.SavedPost
|
import dev.msfjarvis.claw.database.local.SavedPost
|
||||||
|
@ -200,14 +201,15 @@ private fun CommentsButton(
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
@OptIn(ExperimentalLayoutApi::class)
|
||||||
internal fun TagRow(
|
internal fun TagRow(
|
||||||
tags: List<String>,
|
tags: List<String>,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
FlowRow(
|
FlowRow(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
mainAxisSpacing = 8.dp,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
crossAxisSpacing = 8.dp,
|
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
) {
|
) {
|
||||||
tags.forEach { tag -> TagText(tag) }
|
tags.forEach { tag -> TagText(tag) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ fun ClawAppBar(
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = title,
|
title = title,
|
||||||
modifier = modifier.shadow(8.dp),
|
modifier = modifier.shadow(8.dp),
|
||||||
colors = TopAppBarDefaults.smallTopAppBarColors(containerColor = backgroundColor),
|
colors = TopAppBarDefaults.topAppBarColors(containerColor = backgroundColor),
|
||||||
navigationIcon = navigationIcon,
|
navigationIcon = navigationIcon,
|
||||||
actions = actions,
|
actions = actions,
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,6 @@ whetstone = "0.6.0-SNAPSHOT"
|
||||||
workmanager = "2.8.0-rc01"
|
workmanager = "2.8.0-rc01"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" }
|
|
||||||
accompanist-sysuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
|
accompanist-sysuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
|
||||||
androidx-activity-compose = "androidx.activity:activity-compose:1.7.0-alpha02"
|
androidx-activity-compose = "androidx.activity:activity-compose:1.7.0-alpha02"
|
||||||
androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha08"
|
androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha08"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue