Skip to content
Snippets Groups Projects
Commit 75ef652e authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes a crash when a colored message contains links

parent 629ebf71
No related branches found
No related tags found
No related merge requests found
...@@ -251,10 +251,10 @@ class QuasselMessageRenderer( ...@@ -251,10 +251,10 @@ class QuasselMessageRenderer(
) )
private fun formatContent(content: String): CharSequence { private fun formatContent(content: String): CharSequence {
val text = SpannableString( val formattedText = ircFormatDeserializer.formatString(content, renderingSettings.colorizeMirc)
ircFormatDeserializer.formatString(content, renderingSettings.colorizeMirc) val text = SpannableString(formattedText)
)
for (result in urlPattern.findAll(content)) { for (result in urlPattern.findAll(formattedText)) {
val group = result.groups[1] val group = result.groups[1]
if (group != null) { if (group != null) {
text.setSpan( text.setSpan(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment