From 2fb82c5e819c7002da9047f1ca75fef7d9fd2267 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 1 Oct 2026 15:21:25 +0200 Subject: [PATCH] Make the whole avatar row clickable, with ripple on the avatar --- .../features/home/impl/components/HomeTopBar.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/HomeTopBar.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/HomeTopBar.kt index b686fb90e5..e799f44e25 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/HomeTopBar.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/HomeTopBar.kt @@ -9,6 +9,7 @@ package io.element.android.features.home.impl.components import androidx.compose.foundation.clickable +import androidx.compose.foundation.indication import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -341,16 +342,21 @@ private fun AccountIcon( val testTag = if (isCurrentAccount) Modifier.testTag(TestTags.homeScreenSettings) else Modifier val interactionSource = remember { MutableInteractionSource() } Row( - modifier = modifier, + modifier = modifier + .then(testTag) + .clickable( + interactionSource = interactionSource, + onClick = onClick, + // The ripple is rendered on the avatar only, see below. + indication = null, + ), verticalAlignment = Alignment.CenterVertically, ) { Box( modifier = Modifier - .then(testTag) .minimumInteractiveComponentSize() - .clickable( + .indication( interactionSource = interactionSource, - onClick = onClick, indication = ripple(bounded = false), ), contentAlignment = Alignment.Center,