@@ -30,14 +30,15 @@ import ContextMenu, { aboveLeftOf, MenuItem, useContextMenu } from "../../struct
3030import { useTooltip } from "../../../utils/useTooltip" ;
3131import { _t } from "../../../languageHandler" ;
3232import { useRovingTabIndex } from "../../../accessibility/RovingTabIndex" ;
33+ import { Layout } from "../../../settings/enums/Layout" ;
3334
3435// SC: Pass this as props
3536// // #20547 Design specified that we should show the three latest read receipts
3637// const MAX_READ_AVATARS_PLUS_N = 3;
3738// // #21935 If we’ve got just 4, don’t show +1, just show all of them
3839// const MAX_READ_AVATARS = MAX_READ_AVATARS_PLUS_N + 1;
3940
40- const READ_AVATAR_OFFSET = 10 ;
41+ // const READ_AVATAR_OFFSET = 10;
4142export const READ_AVATAR_SIZE = 16 ;
4243
4344interface Props {
@@ -48,6 +49,7 @@ interface Props {
4849 isTwelveHour : boolean ;
4950 maxReadAvatarsPlusN : number ;
5051 maxReadAvatars : number ;
52+ layout ?: Layout ;
5153}
5254
5355interface IAvatarPosition {
@@ -89,7 +91,7 @@ export function readReceiptTooltip(members: string[], hasMore: boolean): string
8991export function ReadReceiptGroup (
9092 {
9193 readReceipts, readReceiptMap, checkUnmounting, suppressAnimation, isTwelveHour,
92- maxReadAvatarsPlusN, maxReadAvatars,
94+ maxReadAvatarsPlusN, maxReadAvatars, layout ,
9395 } : Props ,
9496) {
9597 const [ menuDisplayed , button , openMenu , closeMenu ] = useContextMenu ( ) ;
@@ -104,6 +106,9 @@ export function ReadReceiptGroup(
104106 ? MAX_READ_AVATARS_PLUS_N
105107 : MAX_READ_AVATARS ;
106108
109+ // SC: Don't use offset for bubble layout
110+ const READ_AVATAR_OFFSET = layout == Layout . Bubble ? READ_AVATAR_SIZE - 1 : 10 ;
111+
107112 const tooltipMembers : string [ ] = readReceipts . slice ( 0 , maxAvatars )
108113 . map ( it => it . roomMember ?. name ?? it . userId ) ;
109114 const tooltipText = readReceiptTooltip ( tooltipMembers , hasMore ) ;
0 commit comments