android: Sender name in chatlist (#1251)

* android: Sender name in chatlist

* Sender is bold

* RTL for sender text
This commit is contained in:
Stanislav Dmitrenko
2022-10-24 18:47:03 +03:00
committed by GitHub
parent 15c8945fd3
commit c58d069fbd
2 changed files with 3 additions and 3 deletions

View File

@@ -60,8 +60,7 @@ fun MarkdownText (
else -> " "
}
CompositionLocalProvider(
// When we draw `sender` is has issues on LTR languages set globally with RTL text language
LocalLayoutDirection provides if (textLayoutDirection != LocalLayoutDirection.current && sender == null)
LocalLayoutDirection provides if (textLayoutDirection != LocalLayoutDirection.current)
if (LocalLayoutDirection.current == LayoutDirection.Ltr) LayoutDirection.Rtl else LayoutDirection.Ltr
else
LocalLayoutDirection.current

View File

@@ -84,7 +84,8 @@ fun ChatPreviewView(chat: Chat, chatModelIncognito: Boolean, currentUserProfileD
MarkdownText(
ci.text,
ci.formattedText,
sender = null,
sender = if (cInfo is ChatInfo.Group && !ci.chatDir.sent) ci.memberDisplayName else null,
senderBold = true,
metaText = null,
maxLines = 2,
overflow = TextOverflow.Ellipsis,