diff --git a/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatDeserializer.kt b/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatDeserializer.kt index be95a8de0562e1ccb087ffc890b6197b02221e89..75d3c7c00315b1205f5751abfe67c1444bdfd989 100644 --- a/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatDeserializer.kt +++ b/app/src/main/java/de/kuschku/quasseldroid_ng/util/irc/format/IrcFormatDeserializer.kt @@ -361,13 +361,13 @@ class IrcFormatDeserializer(private val context: Context) { private inner class ColorIrcFormat(val foreground: Byte, val background: Byte) : IrcFormat { override fun applyTo(editable: SpannableStringBuilder, from: Int, to: Int) { - if (foreground.toInt() > 0 && foreground.toInt() < mircColors.size) { + if (foreground.toInt() >= 0 && foreground.toInt() < mircColors.size) { editable.setSpan( IrcForegroundColorSpan(foreground.toInt(), mircColors[foreground.toInt()]), from, to, Spanned.SPAN_INCLUSIVE_EXCLUSIVE ) } - if (background.toInt() > 0 && background.toInt() < mircColors.size) { + if (background.toInt() >= 0 && background.toInt() < mircColors.size) { editable.setSpan( IrcBackgroundColorSpan(background.toInt(), mircColors[background.toInt()]), from, to, Spanned.SPAN_INCLUSIVE_EXCLUSIVE diff --git a/lib/src/main/java/de/kuschku/libquassel/protocol/message/ClientInitSerializer.kt b/lib/src/main/java/de/kuschku/libquassel/protocol/message/ClientInitSerializer.kt index 3023e722c82e398b457be8d4f50959c742804855..f82d5819c151481999d9ba87172efb61339002fb 100644 --- a/lib/src/main/java/de/kuschku/libquassel/protocol/message/ClientInitSerializer.kt +++ b/lib/src/main/java/de/kuschku/libquassel/protocol/message/ClientInitSerializer.kt @@ -17,6 +17,6 @@ object ClientInitSerializer : HandshakeMessageSerializer<HandshakeMessage.Client override fun deserialize(data: QVariantMap) = HandshakeMessage.ClientInit( clientVersion = data["ClientVersion"].value(), buildDate = data["ClientDate"].value(), - clientFeatures = Flags.Companion.of(data["Features"].value(0)) + clientFeatures = Flags.of(data["Features"].value(0)) ) }