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 d75b249bd7
commit 348f787058
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cc5bf16206197d8f79803b0a53bf9e9f329522855e3e594f775a2d9cf26f1739
size 60219
oid sha256:9ade5d45c72d66bc1ede4ddd84976981d7cfc59b90bd17c97fcfdf6ed44fdde9
size 59753

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0f89334dbc8f8cb871f6649bcb5b869a8d25193376976cff6e33ad44c724b64
size 60111
oid sha256:66ad9872af4087c25611715b1d369893daa948aa2e1e4b8bc6fbff6067c3295e
size 59685

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c55355ed7ab137016b21ec96a78ae954887d08a2843be9e5f6686015e0792c70
size 59695
oid sha256:7567339acb87356f182961883bfde348cbfdf406eedefc2ecb54fba9cd26e2f2
size 59291

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b00a709eb1e8ed90d193d274ff1449840da856d782f07511698fa4cf1a105a19
size 59640
oid sha256:668c3e76f40df6ee3d64d595b840d81d62ec3f52474cd2fc261109aedbf46a69
size 59291