Timeline header: ensure that the decoration is clickable (#4495)

* Timeline header: ensure that the decoration is clickable, and properly fix the icon rendering.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Benoit Marty
2025-03-28 17:28:24 +01:00
committed by GitHub
parent 020ba00bcf
commit f425965e2e
5 changed files with 13 additions and 15 deletions

View File

@@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredWidthIn
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -484,14 +483,15 @@ private fun MessagesViewTopBar(
BackButton(onClick = onBackClick)
},
title = {
val roundedCornerShape = RoundedCornerShape(8.dp)
Row(
modifier = Modifier
.clip(roundedCornerShape)
.clickable { onRoomDetailsClick() },
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically,
) {
val roundedCornerShape = RoundedCornerShape(8.dp)
val titleModifier = Modifier
.clip(roundedCornerShape)
.clickable { onRoomDetailsClick() }
val titleModifier = Modifier.weight(1f, fill = false)
if (roomName != null && roomAvatar != null) {
RoomAvatarAndNameRow(
roomName = roomName,
@@ -509,7 +509,6 @@ private fun MessagesViewTopBar(
when (dmUserIdentityState) {
IdentityState.Verified -> {
Icon(
modifier = Modifier.requiredWidthIn(min = 16.dp),
imageVector = CompoundIcons.Verified(),
tint = ElementTheme.colors.iconSuccessPrimary,
contentDescription = null,
@@ -517,7 +516,6 @@ private fun MessagesViewTopBar(
}
IdentityState.VerificationViolation -> {
Icon(
modifier = Modifier.requiredWidthIn(min = 16.dp),
imageVector = CompoundIcons.ErrorSolid(),
tint = ElementTheme.colors.iconCriticalPrimary,
contentDescription = null,