mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-03 02:07:42 +01:00
enhancement(common): rename compact post layout
This commit is contained in:
parent
6a808439f3
commit
d21b6799f6
@ -6,25 +6,25 @@ import dev.icerock.moko.resources.compose.stringResource
|
||||
|
||||
sealed interface PostLayout {
|
||||
data object Card : PostLayout
|
||||
data object List : PostLayout
|
||||
data object Compact : PostLayout
|
||||
data object Full : PostLayout
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PostLayout.toReadableName(): String = when (this) {
|
||||
PostLayout.Full -> stringResource(MR.strings.settings_post_layout_full)
|
||||
PostLayout.List -> stringResource(MR.strings.settings_post_layout_list)
|
||||
PostLayout.Compact -> stringResource(MR.strings.settings_post_layout_compact)
|
||||
else -> stringResource(MR.strings.settings_post_layout_card)
|
||||
}
|
||||
|
||||
fun Int.toPostLayout(): PostLayout = when (this) {
|
||||
1 -> PostLayout.List
|
||||
1 -> PostLayout.Compact
|
||||
2 -> PostLayout.Full
|
||||
else -> PostLayout.Card
|
||||
}
|
||||
|
||||
fun PostLayout.toInt(): Int = when (this) {
|
||||
PostLayout.Full -> 2
|
||||
PostLayout.List -> 1
|
||||
PostLayout.Compact -> 1
|
||||
else -> 0
|
||||
}
|
@ -71,7 +71,7 @@ fun PostCard(
|
||||
}
|
||||
},
|
||||
) {
|
||||
if (postLayout != PostLayout.List) {
|
||||
if (postLayout != PostLayout.Compact) {
|
||||
ExtendedPost(
|
||||
post = post,
|
||||
hideAuthor = hideAuthor,
|
||||
@ -236,7 +236,7 @@ private fun ExtendedPost(
|
||||
if (withOverflowBlurred) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.height(Spacing.s)
|
||||
.height(Spacing.l)
|
||||
.fillMaxWidth()
|
||||
.align(Alignment.BottomCenter).background(
|
||||
brush = Brush.verticalGradient(
|
||||
|
@ -52,7 +52,7 @@ class PostLayoutBottomSheet : Screen {
|
||||
)
|
||||
val values = listOf(
|
||||
PostLayout.Card,
|
||||
PostLayout.List,
|
||||
PostLayout.Compact,
|
||||
PostLayout.Full,
|
||||
)
|
||||
Column(
|
||||
|
@ -109,7 +109,7 @@
|
||||
<string name="settings_enable_swipe_actions">Enable swipe actions</string>
|
||||
<string name="settings_custom_seed_color">Custom theme color</string>
|
||||
<string name="settings_post_layout">Post layout</string>
|
||||
<string name="settings_post_layout_list">List</string>
|
||||
<string name="settings_post_layout_compact">Compact</string>
|
||||
<string name="settings_post_layout_card">Card</string>
|
||||
<string name="settings_post_layout_full">Full</string>
|
||||
<string name="settings_color_blue">Corporate blue</string>
|
||||
|
@ -106,7 +106,7 @@
|
||||
<string name="settings_enable_swipe_actions">Activar acciones de deslizamiento</string>
|
||||
<string name="settings_custom_seed_color">Color tema personalizado</string>
|
||||
<string name="settings_post_layout">Disposición publicaciones</string>
|
||||
<string name="settings_post_layout_list">Listado</string>
|
||||
<string name="settings_post_layout_compact">Compacto</string>
|
||||
<string name="settings_post_layout_card">Tarjetas</string>
|
||||
<string name="settings_post_layout_full">Completo</string>
|
||||
<string name="settings_color_blue">Azul corporativo</string>
|
||||
|
@ -106,7 +106,7 @@
|
||||
<string name="settings_enable_swipe_actions">Consenti azioni allo swipe</string>
|
||||
<string name="settings_custom_seed_color">Colore tema personalizzato</string>
|
||||
<string name="settings_post_layout">Layout post</string>
|
||||
<string name="settings_post_layout_list">Lista</string>
|
||||
<string name="settings_post_layout_compact">Compatto</string>
|
||||
<string name="settings_post_layout_card">Carta</string>
|
||||
<string name="settings_post_layout_full">Intero</string>
|
||||
<string name="settings_color_blue">Blu aziendale</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user