Merge pull request #3246 from nextcloud/bugfix/noid/fix3235ThemingIssues

Fix theming issues
This commit is contained in:
Andy Scherzinger 2023-08-12 17:28:04 +02:00 committed by GitHub
commit c4a7fbf736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -363,7 +363,11 @@ class TalkSpecificViewThemeUtils @Inject constructor(
fun themeMarkdown(context: Context, message: String, incoming: Boolean): Spanned {
return withScheme(context) { scheme ->
return@withScheme if (incoming) {
MessageUtils(context).getRenderedMarkdownText(context, message, R.color.nc_incoming_text_default)
MessageUtils(context).getRenderedMarkdownText(
context,
message,
context.getColor(R.color.nc_incoming_text_default)
)
} else {
MessageUtils(context).getRenderedMarkdownText(context, message, scheme.onSurfaceVariant)
}

View file

@ -71,7 +71,7 @@ class MessageUtils(val context: Context) {
} else if (message.renderMarkdown == false) {
SpannableString(message.message)
} else {
enrichChatMessageText(context, message.text, incoming, viewThemeUtils)
enrichChatMessageText(context, message.message!!, incoming, viewThemeUtils)
}
}