From 98c6ac34ae6c4bf10b942e5e68aeb220919d70b7 Mon Sep 17 00:00:00 2001 From: Julius Linus Date: Tue, 3 Oct 2023 08:00:17 -0500 Subject: [PATCH] Quick bug fix Signed-off-by: rapterjet2004 --- .../java/com/nextcloud/talk/utils/message/MessageUtils.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt b/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt index 89b64c55fb..786d9f7f4a 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt @@ -71,7 +71,8 @@ class MessageUtils(val context: Context) { } else if (message.renderMarkdown == false) { SpannableString(message.message) } else { - enrichChatMessageText(context, message.message!!, incoming, viewThemeUtils) + val newMessage = message.message!!.replace("\n", " \n", false) + enrichChatMessageText(context, newMessage, incoming, viewThemeUtils) } } @@ -106,6 +107,7 @@ class MessageUtils(val context: Context) { return processedMessageText } + @Suppress("NestedBlockDepth", "LongParameterList") private fun processMessageParameters( themingContext: Context, viewThemeUtils: ViewThemeUtils,