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