From b71f854a2dbc2eb045339c98e58ecc4dbdd6e485 Mon Sep 17 00:00:00 2001 From: Shahaf <10106174+kotevcode@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:06:28 +0300 Subject: [PATCH] [RTL] Chat List: Various fixes (#452) --- src/components/left/main/Chat.scss | 10 ++++++++++ .../left/main/hooks/useChatListEntry.tsx | 18 +++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/components/left/main/Chat.scss b/src/components/left/main/Chat.scss index 4950a8988..cf70f91e0 100644 --- a/src/components/left/main/Chat.scss +++ b/src/components/left/main/Chat.scss @@ -249,6 +249,15 @@ } .last-message { + overflow: hidden; + display: flex; + &-summary { + text-overflow: ellipsis; + overflow: hidden; + flex: unset; + max-width: none; + white-space: nowrap; + } .draft { &::after { content: ": "; @@ -280,6 +289,7 @@ vertical-align: -0.25rem; object-fit: cover; + flex-shrink: 0; body.is-ios & { width: 1.125rem; diff --git a/src/components/left/main/hooks/useChatListEntry.tsx b/src/components/left/main/hooks/useChatListEntry.tsx index dd99c464b..bc28a8c7d 100644 --- a/src/components/left/main/hooks/useChatListEntry.tsx +++ b/src/components/left/main/hooks/useChatListEntry.tsx @@ -105,12 +105,14 @@ export default function useChatListEntry({ return (

{oldLang('Draft')} - {renderTextWithEntities({ - text: draft.text?.text || '', - entities: draft.text?.entities, - asPreview: true, - withTranslucentThumbs: true, - })} + + {renderTextWithEntities({ + text: draft.text?.text || '', + entities: draft.text?.entities, + asPreview: true, + withTranslucentThumbs: true, + })} +

); } @@ -133,7 +135,9 @@ export default function useChatListEntry({ )} {!isSavedDialog && lastMessage.forwardInfo && ()} {lastMessage.replyInfo?.type === 'story' && ()} - {renderSummary(lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)} + + {renderSummary(lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)} +

); }, [