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

Only serialize old-school mirc colors as codes

parent c3e56cb9
No related branches found
No related tags found
No related merge requests found
...@@ -183,13 +183,13 @@ class IrcFormatSerializer @Inject constructor(private val context: Context) { ...@@ -183,13 +183,13 @@ class IrcFormatSerializer @Inject constructor(private val context: Context) {
val hasForegroundBefore = foreground != null val hasForegroundBefore = foreground != null
val hasBackgroundBefore = background != null val hasBackgroundBefore = background != null
val foregroundBeforeCodeValid = foregroundCode != null val foregroundBeforeCodeValid = foregroundCode != null && foregroundCode < 16
val backgroundBeforeCodeValid = backgroundCode != null val backgroundBeforeCodeValid = backgroundCode != null && backgroundCode < 16
val hasForegroundAfter = afterForeground != null val hasForegroundAfter = afterForeground != null
val hasBackgroundAfter = afterBackground != null val hasBackgroundAfter = afterBackground != null
val foregroundAfterCodeValid = afterForegroundCode != null val foregroundAfterCodeValid = afterForegroundCode != null && afterForegroundCode < 16
val backgroundAfterCodeValid = afterBackgroundCode != null val backgroundAfterCodeValid = afterBackgroundCode != null && afterBackgroundCode < 16
if ((!hasBackgroundAfter || backgroundAfterCodeValid) && if ((!hasBackgroundAfter || backgroundAfterCodeValid) &&
(!hasForegroundAfter || foregroundAfterCodeValid) && (!hasForegroundAfter || foregroundAfterCodeValid) &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment