desktop, android: avatar hover and press in the avatar's shape (#8218)

* ui: agent placeholder as white dots on a filled circle; avatar hover and press in its shape

The agent avatar is a filled circle with three dots cut out, on iOS (agent.circle.fill) and Android/desktop (ic_avatar_agent), as the other filled placeholders; the small agent icon stays. Avatars in chats take clicks through AvatarClickArea, whose indication is clipped to the avatar: a circle for placeholders, the photo's rounded square for photos, in Flat and Classic rows, for members and channels.

* ui: references of the agent placeholder; the profile menu keeps the agent dots

The profile menu row draws an outline person, so it keeps the three-dot agent icon at text size.

* ios: references of the peer type placeholders with the agent circle

* ui: agent placeholder as on stable

* ios: remove the unused agent circle image
This commit is contained in:
Evgeny @ SimpleX Chat authored and GitHub committed 2026-11-16 22:25:22 +00:00
1 parent 77bf7b383b
commit 3b88b13bae
4 files changed
+46 -13

No files matched your search

@@ -2122,8 +2122,9 @@ fun BoxScope.ChatItemsList(
}
Row(Modifier.graphicsLayer { translationX = selectionOffset.toPx() }) {
val member = cItem.chatDir.groupMember
Box(Modifier.clickable { showMemberInfo(chatInfo.groupInfo, member) }) {
Box {
MemberImage(member, 31.dp * fontSizeSqrtMultiplier, Modifier.centeredIn(MEMBER_IMAGE_SIZE * fontSizeSqrtMultiplier))
AvatarClickArea(member.image, 31.dp * fontSizeSqrtMultiplier, Modifier.centeredIn(MEMBER_IMAGE_SIZE * fontSizeSqrtMultiplier)) { showMemberInfo(chatInfo.groupInfo, member) }
}
Box(modifier = Modifier.padding(top = 2.dp, start = 4.dp).chatItemOffset(cItem, itemSeparation.largeGap, revealed = revealed.value)) {
ChatItemViewShortHand(cItem, itemSeparation, range, false, dismissState.offset.value)
@@ -2198,7 +2199,7 @@ fun BoxScope.ChatItemsList(
SelectedListItem(Modifier, cItem.id, selectedChatItems)
}
Row(Modifier.graphicsLayer { translationX = selectionOffset.toPx() }) {
Box(Modifier.clickable { showChatInfo() }) {
Box {
ProfileImage(
31.dp * fontSizeSqrtMultiplier,
chatInfo.groupInfo.image,
@@ -2206,6 +2207,7 @@ fun BoxScope.ChatItemsList(
backgroundColor = MaterialTheme.colors.background,
modifier = Modifier.centeredIn(MEMBER_IMAGE_SIZE * fontSizeSqrtMultiplier)
)
AvatarClickArea(chatInfo.groupInfo.image, 31.dp * fontSizeSqrtMultiplier, Modifier.centeredIn(MEMBER_IMAGE_SIZE * fontSizeSqrtMultiplier)) { showChatInfo() }
}
Box(modifier = Modifier.padding(top = 2.dp, start = 4.dp).chatItemOffset(cItem, itemSeparation.largeGap, revealed = revealed.value)) {
ChatItemViewShortHand(cItem, itemSeparation, range, false)
@@ -332,8 +332,9 @@ fun chatItemSender(
return when {
cItem.channelIsSender && chatInfo is ChatInfo.Group ->
ChatItemSender(chatInfo.chatViewName, null, stringResource(MR.strings.channel_role_label), dir.sent) {
Box(Modifier.clickable { showChatInfo() }) {
Box {
ProfileImage(imageSize, chatInfo.groupInfo.image, chatInfo.groupInfo.chatIconName, backgroundColor = MaterialTheme.colors.background)
AvatarClickArea(chatInfo.groupInfo.image, imageSize, Modifier.matchParentSize()) { showChatInfo() }
}
}
dir is CIDirection.DirectRcv ->
@@ -348,8 +349,9 @@ fun chatItemSender(
if (memCount == 1) memberRole(member, chatInfo.isChannel) else null,
false
) {
Box(Modifier.clickable { showMemberInfo(chatInfo.groupInfo, member) }) {
Box {
MemberImage(member, imageSize)
AvatarClickArea(member.image, imageSize, Modifier.matchParentSize()) { showMemberInfo(chatInfo.groupInfo, member) }
}
}
}
@@ -16,6 +16,9 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.*
import androidx.compose.ui.geometry.CornerRadius
import androidx.compose.ui.geometry.RoundRect
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.*
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.layout.layout
@@ -312,6 +315,32 @@ private fun Modifier.insetTo(ratio: Float): Modifier = layout { measurable, cons
}
}
@Composable
fun profileImageShape(image: String?, size: Dp): Shape {
val percent = remember { appPreferences.profileImageCornerRadius.state }
val r = max(0f, percent.value)
return when {
image == null || r >= 50 -> CircleShape
r <= 0 -> InsetSquareShape(squareToCircleRatio, 0.dp)
else -> {
val ratio = squareToCircleRatio + r * radiusFactor
InsetSquareShape(ratio, size * ratio * r / 100)
}
}
}
private class InsetSquareShape(private val ratio: Float, private val radius: Dp) : Shape {
override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline {
val inset = ((size.width - size.width * ratio) / 2).roundToInt().toFloat()
return Outline.Rounded(RoundRect(inset, inset, size.width - inset, size.height - inset, CornerRadius(with(density) { radius.toPx() })))
}
}
@Composable
fun AvatarClickArea(image: String?, size: Dp, modifier: Modifier, onClick: () -> Unit) {
Box(modifier.clip(profileImageShape(image, size)).clickable(onClick = onClick))
}
@Preview
@Composable
fun PreviewChatInfoImage() {
+9 -9
View File
@@ -128,7 +128,7 @@ The message list is a `LazyColumnWithScrollBar` with `reverseLayout = true`, mea
### Item Layout (ChatViewListItem)
- **Group received messages** with `showAvatar = true`: Column layout with `MemberNameAndRole` header, `MemberImage` (clickable to `showMemberInfo`), and message bubble. The name starts at the bubble edge, 4dp after the avatar, as the bubble (user, as iOS).
- **Group received messages** with `showAvatar = true`: Column layout with `MemberNameAndRole` header, `MemberImage` (clickable to `showMemberInfo`), and message bubble. Avatars in chats take clicks through `AvatarClickArea` over the image: its hover and press indication is clipped to the avatar's shape (`profileImageShape`): a circle for placeholders, the photo's rounded square with the corner radius setting for photos (user); Flat senders use it too. The name starts at the bubble edge, 4dp after the avatar, as the bubble (user, as iOS).
- **Group received without avatar:** Indented to align with avatar-bearing messages.
- **Sent messages (group or direct):** Right-aligned with larger start padding.
- **Direct messages:** Symmetric padding (76dp opposite side).
@@ -206,7 +206,7 @@ P + H/2 a sender change in a group, above the avatar (H: TERMINAL_LEVEL_STEP)
In chats with avatars the item is in the message column, after the avatar column (section 10, Row Layout).
- Cards: images and videos, link previews, chat link cards, code blocks, tables and rules, files, voice messages, the quote, large emoji, group invitations, and the rounded cards of deleted and error items (`ItemTextCard`, `DecryptionErrorCard`). Each is marked with [`Modifier.messageCard()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L239); the marks are read in terminal rows only. A card has `TERMINAL_PARAGRAPH_GAP` next to text or another card of its item, as the top padding of the lower part. At the top of an item it has none above it: `TerminalChatItemRow` adds `TERMINAL_PARAGRAPH_GAP` under the sender row when the item reports a card at its top. At the bottom of an item it has none below it: `ItemWithMeta` adds `gapBelowCard` when the content reports a card at its bottom, [`terminalReactionsGap(item)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L153-L154), `TERMINAL_PARAGRAPH_GAP` when reactions follow as a line of text, otherwise 0.
- Event, feature and member-created items use [`chatEventPadding()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIEventView.kt#L24-L27): in terminal rows the text edge at the sides and no padding above and below, so that the row gap, `TERMINAL_PARAGRAPH_GAP`, separates an event from the rows above and below it (classic: 6dp at the sides, above and below). The icons of feature and preference items are centred on the text and take no height (`Modifier.inlineIcon()`); the row of merged feature icons is one event text line high; both also in bubbles. `CIEventView` has no line limit in terminal rows, so the copy of the time stays at the end of the text (user, D23; classic: 4 lines). Voice and call items, reactions and group invitations start at the text edge. The rounded cards of deleted and error items (`ItemTextCard`, `DecryptionErrorCard`) start [`terminalPillStart()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L454-L455) into the message column: `CHAT_ITEM_TEXT_PADDING` less the gutter of the row, at least 0, read from [`LocalTerminalGutter`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L452), which `TerminalChatItemRow` provides. In groups the card starts at the column and its text, 12dp inside, is on the text edge of the messages, as on master (user); in chats without avatars the card starts at the text edge, 12dp from the screen edge. The voice play button and file status circle are filled with the quote colour (`sentQuote`, `receivedQuote`; classic: `sentMessage`, `receivedMessage`).
- Event, feature and member-created items use [`chatEventPadding()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIEventView.kt#L24-L27): in terminal rows the text edge at the sides and no padding above and below, so that the row gap, `TERMINAL_PARAGRAPH_GAP`, separates an event from the rows above and below it (classic: 6dp at the sides, above and below). The icons of feature and preference items are centred on the text and take no height (`Modifier.inlineIcon()`); the row of merged feature icons is one event text line high; both also in bubbles. `CIEventView` has no line limit in terminal rows, so the copy of the time stays at the end of the text (user, D23; classic: 4 lines). Voice and call items, reactions and group invitations start at the text edge. The rounded cards of deleted and error items (`ItemTextCard`, `DecryptionErrorCard`) start [`terminalPillStart()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L456-L457) into the message column: `CHAT_ITEM_TEXT_PADDING` less the gutter of the row, at least 0, read from [`LocalTerminalGutter`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L454), which `TerminalChatItemRow` provides. In groups the card starts at the column and its text, 12dp inside, is on the text edge of the messages, as on master (user); in chats without avatars the card starts at the text edge, 12dp from the screen edge. The voice play button and file status circle are filled with the quote colour (`sentQuote`, `receivedQuote`; classic: `sentMessage`, `receivedMessage`).
- Time and status: placed at the end of the row by [`ItemWithMeta`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L258-L272), the baseline of the time on the last baseline of the content (section 10). Message text ends with [`metaReserveCopy`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIMetaView.kt#L226-L272), in both layouts: a transparent copy of the meta with no-break spaces, in `FontWeight.Normal`. The copy starts with a breaking space (`breakBefore`, user) when text precedes it in its paragraph, so the time alone moves to the next line when it does not fit; the copy of the meta line under a last card or rule (`range` empty) and the copy measured for `ruleMinWidth` start with a word joiner (U+2060), which forbids a line break before the copy. The direction mark of its paragraph follows (U+200E left-to-right, U+200F right-to-left), so that the bidirectional algorithm places the copy at the end of the line, also after words in the other direction on a wrapped last line. Its spaces and texts are appended by [`reserveSpaceForMeta`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIMetaView.kt#L144-L224), which has the conditions of `CIMetaText`, except that the timer is reserved for every timed message, and returns the classic string unchanged, through span parameters: icon spaces and the spaces between them are no-break spaces at the `body1` size in dp (16dp converted to sp with the density, so that they keep their width at every font scale, as the icons do; also after a heading and in event text), 18dp for each icon, wider than a 12dp icon with its spacer (15dp or 16dp); after the 17dp icons one more space is added (22.5dp against 21dp): the sent and received status icons (`tallStatusIcon`, also used by `CIMetaText`) and the via-proxy icon; the time and the timer text of a disappearing message are at 12sp. The copy includes the file encryption and signature icons (`encrypted` and `signedFileVerified` of `MarkdownText`, passed by `CIMarkdownText` from the item). Text whose paragraph direction (`textLayoutDirection`: right-to-left when the first 50 characters of the message text hold a right-to-left character; all blocks and lines of a message take it) differs from the outer direction (`parentDirection`, passed by the blocks and by the meta line of a live message; otherwise `LocalLayoutDirection`) ends with a line break instead of the copy, so the time is placed on an added empty line. Emoji, and the last code block, table or rule of a message, report their width (`Modifier.messageLastLine()`); the time moves under them when the row leaves no room for it beside them. The meta line with the time is drawn under such a block only for live messages, for the typing indicator. In terminal rows the status of an item being sent (`SndNew`), completely sent (`SndSent`, complete), delivered (`SndRcvd`, receipt ok, complete), unread (`RcvNew`) or read (`RcvRead`) is drawn only with the time ([`terminalShowsStatus(status, showTimestamp)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L156-L161)), as on iOS; the status of a partial delivery, an error or a warning is drawn without the time too. `CIMetaView`, `metaReserveCopy` and the size line of files (`CIFileView`) apply it through [`shownStatus(showStatus, meta, showTimestamp)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIMetaView.kt#L274-L276); in bubbles `showStatus` is unchanged. File text keeps the space reserved for the time at the end of its size line. Images and videos without a caption (`captionlessMedia`) keep the meta in `secondary` beside the media when it fits in the row, otherwise the meta is drawn over the bottom end of the media in white, as in the classic layout (`overlayMeta`). Event items are wrapped in [`ChatEventWithMeta`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/CIEventView.kt#L29-L42), which passes the separator and the end of the event text apart (`separator`, `ts`): in the classic layout two spaces and the time without a style, in the terminal layout three transparent no-break spaces in `chatEventStyle` and the transparent `metaReserveCopy` of the meta without status and edit icons, so the last word of the event text is moved to the next line with the time when they do not fit. Each view puts the separator where the classic layout has two spaces (user, D28): after the event text, or in the "Open" and "Accept" links, so the classic output is unchanged.
- Group invitations, deleted items and error items (`IntegrityErrorItemView`, `CIRcvDecryptionError`) keep their rounded coloured card. Its shape is [`terminalCardShape()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt#L1262-L1263): 18dp × the `chatItemRoundness` preference, without a tail, as the clip of media (user); square at 0.
@@ -441,18 +441,18 @@ Colours: the app, user and chat themes apply as in the classic layout. Wallpaper
| [`Modifier.inlineIcon()`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L247-L256) | Terminal: lays the element out with no height, centred on its position, so that a row with `Alignment.CenterVertically` takes the height of its text and centres the element on it: icons of feature and preference items and of message headers. Also in bubbles; outside chats: the modifier unchanged |
| [`ItemWithMeta(meta, overlayMeta, metaReserved, endButton, gapBelowCard, content)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L258-L272) | Classic: `content` with the meta passed as `inlineMeta`. Terminal: `content` without meta, and the meta in a box with 12dp end padding at the end of the available width, the row (private [`TerminalMetaLayout`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L274-L314)). `endButton`, in a box with the same end padding, is placed at the end of the row, centred vertically between the content top and the top of the time box (the whole content when the time is over media); the content is measured in the width less the wider of this box and, without `metaReserved`, the time box. The meta is measured first. Without `metaReserved` and `overlayMeta`, the content is measured in the width less the width of the box, so that it does not reach under the time. `metaReserved` is true for content with its own reserve of the space or a reported last line: text with the transparent copy (`metaReserved` of `FramedItemView`), files, emoji and event items. The first baseline of the box (the baseline of the time; without a time, the baseline of a 12sp time centred in the box) is placed on the last baseline of the content. When the content reports its last line and the line and the box together are wider than the row, the box is placed `TERMINAL_META_GAP` (6sp) under the content and the bottom of the row moves down by that gap and the height of the box. When the content reports a card at its bottom (`CardBottom` at the content height), `gapBelowCard` is added below the content (section 4, cards). Content without a baseline (a message of a rule only, a failed call), and captionless media with `overlayMeta`: the box ends `TERMINAL_META_GAP` above the content bottom; when the content and the box together are wider than the row, the `overlayMeta` box is placed at the bottom end of the content instead, `TERMINAL_META_GAP` above its bottom. Either box is placed at the top of the content at most, and the row is at least as tall as the box. When the rule leaves room for the time beside it, the time stays on the baseline of the last text line above it (D24); otherwise it is placed under the rule. |
| [`ChatItemSender`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L319) | Name, badge, role label, `own`, avatar |
| [`chatItemSender(chatInfo, cItem, range, reversedChatItems, showMemberInfo, showChatInfo)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L321-L369) | Sender of a row (table below) |
| [`SenderNameAndRole(sender, modifier)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L374-L398) | Private; name and badge (the `body1` size, semibold; primary for own items, `secondary` otherwise; user) and role label (the same size, medium, `secondary`) |
| [`terminalGutter(chatInfo)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L404-L406) | The start of the message column: in groups `TERMINAL_MEMBER_IMAGE_SIZE` (27dp, scaled by `fontSizeSqrtMultiplier`) plus `TERMINAL_AVATAR_GAP` less `TERMINAL_AVATAR_OVERSHOOT`, 35dp, so that the text starts at 47dp; 0 in other chats |
| [`TerminalChatItemRow(sender, gutter, topGap, modifier, content)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L408-L450) | Row layout below; constants `TERMINAL_MEMBER_IMAGE_SIZE`, `TERMINAL_AVATAR_OVERSHOOT` and `TERMINAL_AVATAR_GAP` ([L400-L402](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L400-L402)) |
| [`chatItemSender(chatInfo, cItem, range, reversedChatItems, showMemberInfo, showChatInfo)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L321-L371) | Sender of a row (table below) |
| [`SenderNameAndRole(sender, modifier)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L376-L400) | Private; name and badge (the `body1` size, semibold; primary for own items, `secondary` otherwise; user) and role label (the same size, medium, `secondary`) |
| [`terminalGutter(chatInfo)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L406-L408) | The start of the message column: in groups `TERMINAL_MEMBER_IMAGE_SIZE` (27dp, scaled by `fontSizeSqrtMultiplier`) plus `TERMINAL_AVATAR_GAP` less `TERMINAL_AVATAR_OVERSHOOT`, 35dp, so that the text starts at 47dp; 0 in other chats |
| [`TerminalChatItemRow(sender, gutter, topGap, modifier, content)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L410-L452) | Row layout below; constants `TERMINAL_MEMBER_IMAGE_SIZE`, `TERMINAL_AVATAR_OVERSHOOT` and `TERMINAL_AVATAR_GAP` ([L402-L404](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TerminalItemView.kt#L402-L404)) |
In `ChatView.kt`, shared with the classic date separator:
| Function | Purpose |
|---|---|
| [`terminalRowsSeparated(olderRow)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3831-L3835) | A date separator or the chat banner between a row and the older row: the newest item of the older row is the banner, or the separation of the older row ([`rowItemSeparation(row, terminal)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3826-L3829)) has a date. False without an older row. The older row is the row of the nearest shown older item ([`MergedItems.olderShownRow(row)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatItemsMerger.kt#L112-L115)) |
| [`terminalRowsSeparated(olderRow)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3833-L3837) | A date separator or the chat banner between a row and the older row: the newest item of the older row is the banner, or the separation of the older row ([`rowItemSeparation(row, terminal)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3828-L3831)) has a date. False without an older row. The older row is the row of the nearest shown older item ([`MergedItems.olderShownRow(row)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatItemsMerger.kt#L112-L115)) |
| `rowItemSeparation(row, terminal)` | Private; the separation of a row, also used by `ChatItemsList` for the date separator it draws: `getItemSeparation` of the newest item of the row and the nearest shown newer item (the oldest item of the newer shown row) when the row is revealed (`MergedItem.revealed`: a single item or a revealed group row), without the newer item otherwise (user, D32). In bubbles `ChatItemsList` applies the event run gap to it (section 4, Bubbles) |
| [`getItemSeparation(chatItem, prevItem, terminal)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3803-L3821) | Private; the time, the large gap and the date between an item and the newer item `prevItem`. The time is hidden when the newer item has the same sender, is less than 60 seconds newer and shows the same minute; in terminal rows it stays shown when the newer item has deleted, moderated or blocked content (`isDeletedContent`) or is marked deleted (`meta.itemDeleted`), although its card shows its own time (user). Bubbles keep this grouping: a bubble before a deleted item in the same minute shows no time |
| [`getItemSeparation(chatItem, prevItem, terminal)`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L3805-L3823) | Private; the time, the large gap and the date between an item and the newer item `prevItem`. The time is hidden when the newer item has the same sender, is less than 60 seconds newer and shows the same minute; in terminal rows it stays shown when the newer item has deleted, moderated or blocked content (`isDeletedContent`) or is marked deleted (`meta.itemDeleted`), although its card shows its own time (user). Bubbles keep this grouping: a bubble before a deleted item in the same minute shows no time |
### Row Layout
@@ -475,7 +475,7 @@ item ChatItemView in the message column: at terminalGutter(chatInf
row height the lower of the item's bottom and the avatar's bottom
```
`ChatItemsList` passes [`showAvatar`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L2466) = `terminalItemShowsSender(item, merged.oldest().nextItem)`, the nearest shown older item, and the row gets `chatItemSender(...)` when it is true, `null` otherwise; the [gap above the row](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L2467-L2472), with `terminalRowsSeparated` of the row of that item (`MergedItems.olderShownRow`), is passed to `ChatViewListItem` as `terminalGap`.
`ChatItemsList` passes [`showAvatar`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L2468) = `terminalItemShowsSender(item, merged.oldest().nextItem)`, the nearest shown older item, and the row gets `chatItemSender(...)` when it is true, `null` otherwise; the [gap above the row](../../common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt#L2469-L2474), with `terminalRowsSeparated` of the row of that item (`MergedItems.olderShownRow`), is passed to `ChatViewListItem` as `terminalGap`.
### Sender Rule