[RTL] Chat List: Various fixes (#452)

This commit is contained in:
Shahaf 2025-08-18 15:06:28 +03:00 committed by GitHub
parent 60c0fdbc13
commit b71f854a2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 7 deletions

View File

@ -249,6 +249,15 @@
} }
.last-message { .last-message {
overflow: hidden;
display: flex;
&-summary {
text-overflow: ellipsis;
overflow: hidden;
flex: unset;
max-width: none;
white-space: nowrap;
}
.draft { .draft {
&::after { &::after {
content: ": "; content: ": ";
@ -280,6 +289,7 @@
vertical-align: -0.25rem; vertical-align: -0.25rem;
object-fit: cover; object-fit: cover;
flex-shrink: 0;
body.is-ios & { body.is-ios & {
width: 1.125rem; width: 1.125rem;

View File

@ -105,12 +105,14 @@ export default function useChatListEntry({
return ( return (
<p className="last-message" dir={oldLang.isRtl ? 'auto' : 'ltr'}> <p className="last-message" dir={oldLang.isRtl ? 'auto' : 'ltr'}>
<span className="draft">{oldLang('Draft')}</span> <span className="draft">{oldLang('Draft')}</span>
{renderTextWithEntities({ <span className="last-message-summary" dir="auto">
text: draft.text?.text || '', {renderTextWithEntities({
entities: draft.text?.entities, text: draft.text?.text || '',
asPreview: true, entities: draft.text?.entities,
withTranslucentThumbs: true, asPreview: true,
})} withTranslucentThumbs: true,
})}
</span>
</p> </p>
); );
} }
@ -133,7 +135,9 @@ export default function useChatListEntry({
)} )}
{!isSavedDialog && lastMessage.forwardInfo && (<Icon name="share-filled" className="chat-prefix-icon" />)} {!isSavedDialog && lastMessage.forwardInfo && (<Icon name="share-filled" className="chat-prefix-icon" />)}
{lastMessage.replyInfo?.type === 'story' && (<Icon name="story-reply" className="chat-prefix-icon" />)} {lastMessage.replyInfo?.type === 'story' && (<Icon name="story-reply" className="chat-prefix-icon" />)}
{renderSummary(lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)} <span className="last-message-summary" dir="auto">
{renderSummary(lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)}
</span>
</p> </p>
); );
}, [ }, [