From e62cfa8fef9782d5baac259acfa46a0352cfcca1 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 09:01:29 +0100 Subject: [PATCH] fix top level property naming Signed-off-by: Marco Antonio Alvarez --- .../components/MessagesReactionButton.kt | 16 ++++++++-------- .../reactionsummary/ReactionSummaryView.kt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt index 7535fa5cd3..cd3d1cef66 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt @@ -119,9 +119,9 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -internal val reactionEmojiLineHeight = 20.sp -internal const val reactionImageAspectRatio = 1.33f -private val addEmojiSize = 16.dp +internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp +internal const val REACTION_IMAGE_ASPECT_RATIO = 1.33f +private val ADD_EMOJI_SIZE = 16.dp @Composable private fun TextContent( @@ -129,7 +129,7 @@ private fun TextContent( modifier: Modifier = Modifier, ) = Text( modifier = modifier - .height(reactionEmojiLineHeight.toDp()), + .height(REACTION_EMOJI_LINE_HEIGHT.toDp()), text = text, style = ElementTheme.typography.fontBodyMdRegular, color = ElementTheme.materialColors.primary @@ -144,7 +144,7 @@ private fun IconContent( contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction), tint = ElementTheme.materialColors.secondary, modifier = modifier - .size(addEmojiSize) + .size(ADD_EMOJI_SIZE) ) @@ -159,8 +159,8 @@ private fun ReactionContent( if (reaction.key.startsWith("mxc://")) { BlurHashAsyncImage( modifier = modifier - .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) - .aspectRatio(reactionImageAspectRatio, false), + .heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp()) + .aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false), model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), blurHash = null ) @@ -170,7 +170,7 @@ private fun ReactionContent( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 15.sp, - lineHeight = reactionEmojiLineHeight, + lineHeight = REACTION_EMOJI_LINE_HEIGHT, ), ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt index 3fcbb7c03c..ed9d79ed97 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt @@ -59,8 +59,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp 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.reactionImageAspectRatio +import io.element.android.features.messages.impl.timeline.components.REACTION_EMOJI_LINE_HEIGHT +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.libraries.designsystem.components.BlurHashAsyncImage import io.element.android.libraries.designsystem.components.avatar.Avatar @@ -202,8 +202,8 @@ private fun AggregatedReactionButton( if (reaction.key.startsWith("mxc://")) { BlurHashAsyncImage( modifier = Modifier - .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) - .aspectRatio(reactionImageAspectRatio, false), + .heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp()) + .aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false), model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), blurHash = null )