-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render markdown in room list #2694
Render markdown in room list #2694
Conversation
I haven't checked so I don't know if that's the case, but if markdown links are also rendered, they should probably not be clickable in the room list, because clicking on the chat can make you accidentally click on a link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some remarks.
Also what about MSGTYPE_EMOTE ? This is maybe another bug, but you could take the opportunity to also handle emote properly here.
@@ -82,13 +87,13 @@ class DisplayableEventFormatter @Inject constructor( | |||
return simpleFormat(senderName, stringProvider.getString(R.string.sent_a_file), appendAuthor) | |||
} | |||
MessageType.MSGTYPE_TEXT -> { | |||
return if (timelineEvent.isReply()) { | |||
// Skip reply prefix, and show important |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you removed this comment?
val body = if (timelineEvent.isReply()) timelineEvent.getTextEditableContent() ?: messageContent.body else messageContent.body | ||
return if (messageContent is MessageTextContent && messageContent.matrixFormattedBody.isNullOrBlank().not()) { | ||
val localFormattedBody = htmlRenderer.get().parse(body) as Document | ||
val renderedBody = htmlRenderer.get().render(localFormattedBody) ?: body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't check, but this maybe introduce some code duplication here.
Will iterate on it on my own branch |
Fixes #452