Skip to content

Commit

Permalink
[PBE-5463] edited label is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
kanat authored and JcMinarro committed Aug 8, 2024
1 parent 0dbddb6 commit 82de746
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public fun MessageFooter(
Column(horizontalAlignment = alignment.contentAlignment) {
MessageTranslatedLabel(messageItem)
if (messageItem.showMessageFooter) {
var showEditLabel by remember { mutableStateOf(message.messageTextUpdatedAt != null) }
val showEditLabel = message.messageTextUpdatedAt != null
var showEditInfo by remember { mutableStateOf(false) }
Row(
modifier = Modifier
Expand Down Expand Up @@ -109,19 +109,15 @@ public fun MessageFooter(
if (date != null) {
Timestamp(date = date, formatType = DateFormatType.TIME)
}
if (showEditLabel) {
if (showEditLabel && !showEditInfo) {
Text(
modifier = Modifier.padding(start = 4.dp, end = 4.dp),
text = "·",
style = ChatTheme.typography.footnote,
color = ChatTheme.colors.textLowEmphasis,
)
Text(
modifier = Modifier
.clickable {
showEditLabel = !showEditLabel
showEditInfo = !showEditInfo
},
modifier = Modifier.clickable { showEditInfo = !showEditInfo },
text = LocalContext.current.getString(R.string.stream_compose_message_list_footnote_edited),
style = ChatTheme.typography.footnote,
color = ChatTheme.colors.textLowEmphasis,
Expand All @@ -132,10 +128,7 @@ public fun MessageFooter(
Row(
modifier = Modifier
.padding(bottom = 4.dp)
.clickable {
showEditLabel = !showEditLabel
showEditInfo = !showEditInfo
},
.clickable { showEditInfo = !showEditInfo },
verticalAlignment = Alignment.CenterVertically,
) {
Text(
Expand Down

0 comments on commit 82de746

Please sign in to comment.