From b318d450c1b71a77b889430146f17b737c9069da Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 28 Sep 2026 19:18:13 -0400 Subject: [PATCH] fix(chat): put the muted chip under a person's profile actions On a DM's profile the chip sat above Message/Share, and since every person profile now has those actions it dropped its held line there, so muting pushed the actions and rows down. The actions now sit 25dp under the join date on every person profile, and the chip follows 16dp below them with its line held, so mute and unmute no longer move anything. Matches iOS (code-ios-app#897). --- .../screens/profile/ChatProfileScreen.kt | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/ChatProfileScreen.kt b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/ChatProfileScreen.kt index 867ae64db6..75aa2b8a22 100644 --- a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/ChatProfileScreen.kt +++ b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/ChatProfileScreen.kt @@ -300,22 +300,32 @@ internal fun ProfileHeader( color = CodeTheme.colors.textSecondary, ) } - // Last, because it is the only line here that is the viewer's setting rather than a fact - // about the person, and the only one that can stop being true while the screen is open. - ChatMuteStatusChip( - viewerState = viewerState, - modifier = Modifier.padding(top = CodeTheme.dimens.grid.x2), - // With the shortcuts below, an empty held line would double the gap above them. This - // screen only shows them for a group member, where there's no mute row to change it. - reserveSpace = shortcuts == null, - ) // Below everything that describes the person: these act on them, like the rows under the - // header, but they're the routine ones, so they sit closest to the name. 15dp here plus - // the mute line's 10dp is 25dp, the same as the first row's inset below them. + // header, but they're the routine ones, so they sit closest to the name. 25dp, the same as + // the first row's inset below them, so they sit centered between the join date and the + // list. Nothing between them and the join date, so they sit at one height on every + // person's profile, muted or not. shortcuts?.let { content -> - Box(modifier = Modifier.padding(top = CodeTheme.dimens.grid.x3)) { + Box(modifier = Modifier.padding(top = CodeTheme.dimens.grid.x5)) { content() } } + // Last, because it is the only line here that is the viewer's setting rather than a fact + // about the person, and the only one that can stop being true while the screen is open. + // Only where there is a mute to show, the DM's own person; there it holds its line so the + // rows below don't move on mute or unmute. 16dp matches iOS, set by eye on device. + viewerState?.let { state -> + ChatMuteStatusChip( + viewerState = state, + modifier = Modifier.padding( + top = if (shortcuts != null) { + CodeTheme.dimens.staticGrid.x4 + } else { + CodeTheme.dimens.grid.x2 + }, + ), + reserveSpace = true, + ) + } } }