[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 {
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;

View File

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