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(
)
private fun formatContent(content: String): CharSequence {
val text = SpannableString(
ircFormatDeserializer.formatString(content, renderingSettings.colorizeMirc)
)
for (result in urlPattern.findAll(content)) {
val formattedText = ircFormatDeserializer.formatString(content, renderingSettings.colorizeMirc)
val text = SpannableString(formattedText)
for (result in urlPattern.findAll(formattedText)) {
val group = result.groups[1]
if (group != null) {
text.setSpan(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment