From 536facce54555c7e1be6e4db353472c51c9c88bc Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Fri, 4 May 2018 00:25:26 +0200
Subject: [PATCH] Fixes #67

Signed-off-by: Janne Koschinski <janne@kuschku.de>
---
 .../libquassel/quassel/syncables/BufferViewConfig.kt        | 4 ++--
 .../libquassel/quassel/syncables/BufferViewConfigTest.kt    | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfig.kt b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfig.kt
index 7b66da97d..85f8df480 100644
--- a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfig.kt
+++ b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfig.kt
@@ -70,8 +70,8 @@ class BufferViewConfig constructor(
     "hideInactiveBuffers" to QVariant.of(hideInactiveBuffers(), Type.Bool),
     "hideInactiveNetworks" to QVariant.of(hideInactiveNetworks(), Type.Bool),
     "disableDecoration" to QVariant.of(disableDecoration(), Type.Bool),
-    "allowedBufferTypes" to QVariant.of(allowedBufferTypes(), Type.Int),
-    "minimumActivity" to QVariant.of(minimumActivity(), Type.Int),
+    "allowedBufferTypes" to QVariant.of(allowedBufferTypes().toInt(), Type.Int),
+    "minimumActivity" to QVariant.of(minimumActivity().toInt(), Type.Int),
     "showSearch" to QVariant.of(showSearch(), Type.Bool)
   )
 
diff --git a/lib/src/test/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfigTest.kt b/lib/src/test/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfigTest.kt
index 562934fd1..c06a5100c 100644
--- a/lib/src/test/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfigTest.kt
+++ b/lib/src/test/java/de/kuschku/libquassel/quassel/syncables/BufferViewConfigTest.kt
@@ -37,7 +37,8 @@ class BufferViewConfigTest {
     original.setHideInactiveNetworks(randomBoolean())
     original.setHideInactiveNetworks(randomBoolean())
     original.setDisableDecoration(randomBoolean())
-    original.setAllowedBufferTypes(Buffer_Type.of(*Buffer_Type.validValues))
+    original.setAllowedBufferTypes(Buffer_Type.of(randomOf(*Buffer_Type.validValues),
+                                                  randomOf(*Buffer_Type.validValues)))
     original.setMinimumActivity(randomOf(*Buffer_Activity.values()).toInt())
     original.setShowSearch(randomBoolean())
 
@@ -56,7 +57,8 @@ class BufferViewConfigTest {
     original.setHideInactiveNetworks(randomBoolean())
     original.setHideInactiveNetworks(randomBoolean())
     original.setDisableDecoration(randomBoolean())
-    original.setAllowedBufferTypes(Buffer_Type.of(*Buffer_Type.validValues))
+    original.setAllowedBufferTypes(Buffer_Type.of(randomOf(*Buffer_Type.validValues),
+                                                  randomOf(*Buffer_Type.validValues)))
     original.setMinimumActivity(randomOf(*Buffer_Activity.values()).toInt())
     original.setShowSearch(randomBoolean())
 
-- 
GitLab