Browse Source

prevent NPE when adding the very first own reaction to a message

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 years ago
parent
commit
9ec7feaaee

+ 4 - 0
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -2746,6 +2746,10 @@ class ChatController(args: Bundle) :
             message.reactions = LinkedHashMap()
         }
 
+        if (message.reactionsSelf == null) {
+            message.reactionsSelf = ArrayList<String>()
+        }
+
         var amount = message.reactions[emoji]
         if (amount == null) {
             amount = 0