mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
refactor(common): resolve Detekt-reported issues
This commit is contained in:
parent
54c4b01411
commit
8851071d58
3 changed files with 11 additions and 7 deletions
|
@ -129,6 +129,8 @@ fun PostLink(
|
|||
}
|
||||
}
|
||||
|
||||
private val CommentEntryPadding = 16f.dp
|
||||
|
||||
@OptIn(ExperimentalAnimationApi::class)
|
||||
@Composable
|
||||
fun CommentEntry(
|
||||
|
@ -144,7 +146,12 @@ fun CommentEntry(
|
|||
.fillMaxWidth()
|
||||
.clickable { expanded = !expanded }
|
||||
.background(MaterialTheme.colorScheme.background)
|
||||
.padding(start = (comment.indentLevel * 16).dp, end = 16.dp, top = 16.dp, bottom = 16.dp),
|
||||
.padding(
|
||||
start = CommentEntryPadding * comment.indentLevel,
|
||||
end = CommentEntryPadding,
|
||||
top = CommentEntryPadding,
|
||||
bottom = CommentEntryPadding,
|
||||
),
|
||||
) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Submitter(
|
||||
|
|
|
@ -71,6 +71,7 @@ internal val DarkThemeColors =
|
|||
inverseSurface = md_theme_dark_inverseSurface,
|
||||
)
|
||||
|
||||
@Suppress("SpreadOperator")
|
||||
@Composable
|
||||
fun LobstersTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
|
@ -80,7 +81,7 @@ fun LobstersTheme(
|
|||
) {
|
||||
val colorScheme =
|
||||
when {
|
||||
dynamicColor && Build.VERSION.SDK_INT >= 31 -> {
|
||||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
val context = LocalContext.current
|
||||
if (darkTheme) {
|
||||
dynamicDarkColorScheme(context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue