fix top level property naming
Signed-off-by: Marco Antonio Alvarez <surakin@gmail.com>
This commit is contained in:
parent
6c06ec4235
commit
e62cfa8fef
2 changed files with 12 additions and 12 deletions
|
|
@ -119,9 +119,9 @@ sealed interface MessagesReactionsButtonContent {
|
||||||
val isHighlighted get() = this is Reaction && reaction.isHighlighted
|
val isHighlighted get() = this is Reaction && reaction.isHighlighted
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val reactionEmojiLineHeight = 20.sp
|
internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp
|
||||||
internal const val reactionImageAspectRatio = 1.33f
|
internal const val REACTION_IMAGE_ASPECT_RATIO = 1.33f
|
||||||
private val addEmojiSize = 16.dp
|
private val ADD_EMOJI_SIZE = 16.dp
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun TextContent(
|
private fun TextContent(
|
||||||
|
|
@ -129,7 +129,7 @@ private fun TextContent(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) = Text(
|
) = Text(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.height(reactionEmojiLineHeight.toDp()),
|
.height(REACTION_EMOJI_LINE_HEIGHT.toDp()),
|
||||||
text = text,
|
text = text,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = ElementTheme.materialColors.primary
|
color = ElementTheme.materialColors.primary
|
||||||
|
|
@ -144,7 +144,7 @@ private fun IconContent(
|
||||||
contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction),
|
contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction),
|
||||||
tint = ElementTheme.materialColors.secondary,
|
tint = ElementTheme.materialColors.secondary,
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.size(addEmojiSize)
|
.size(ADD_EMOJI_SIZE)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -159,8 +159,8 @@ private fun ReactionContent(
|
||||||
if (reaction.key.startsWith("mxc://")) {
|
if (reaction.key.startsWith("mxc://")) {
|
||||||
BlurHashAsyncImage(
|
BlurHashAsyncImage(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp())
|
.heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp())
|
||||||
.aspectRatio(reactionImageAspectRatio, false),
|
.aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false),
|
||||||
model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content),
|
model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content),
|
||||||
blurHash = null
|
blurHash = null
|
||||||
)
|
)
|
||||||
|
|
@ -170,7 +170,7 @@ private fun ReactionContent(
|
||||||
text = reaction.displayKey,
|
text = reaction.displayKey,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular.copy(
|
style = ElementTheme.typography.fontBodyMdRegular.copy(
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
lineHeight = reactionEmojiLineHeight,
|
lineHeight = REACTION_EMOJI_LINE_HEIGHT,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import io.element.android.compound.theme.ElementTheme
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.features.messages.impl.timeline.components.reactionEmojiLineHeight
|
import io.element.android.features.messages.impl.timeline.components.REACTION_EMOJI_LINE_HEIGHT
|
||||||
import io.element.android.features.messages.impl.timeline.components.reactionImageAspectRatio
|
import io.element.android.features.messages.impl.timeline.components.REACTION_IMAGE_ASPECT_RATIO
|
||||||
import io.element.android.features.messages.impl.timeline.model.AggregatedReaction
|
import io.element.android.features.messages.impl.timeline.model.AggregatedReaction
|
||||||
import io.element.android.libraries.designsystem.components.BlurHashAsyncImage
|
import io.element.android.libraries.designsystem.components.BlurHashAsyncImage
|
||||||
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
||||||
|
|
@ -202,8 +202,8 @@ private fun AggregatedReactionButton(
|
||||||
if (reaction.key.startsWith("mxc://")) {
|
if (reaction.key.startsWith("mxc://")) {
|
||||||
BlurHashAsyncImage(
|
BlurHashAsyncImage(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp())
|
.heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp())
|
||||||
.aspectRatio(reactionImageAspectRatio, false),
|
.aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false),
|
||||||
model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content),
|
model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content),
|
||||||
blurHash = null
|
blurHash = null
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue