From df2d2b02caeeda4c15988abd1b094d94f8f468b0 Mon Sep 17 00:00:00 2001 From: virvar Date: Fri, 20 May 2016 14:38:20 +0300 Subject: [PATCH] Fix group members count --- src/status_im/chat/screen.cljs | 3 ++- src/status_im/chats_list/views/inner_item.cljs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index 9967778d4a..2b14049c55 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -48,6 +48,7 @@ (defn typing-all [] [view st/typing-all + ;; TODO stub data (for [member ["Geoff" "Justas"]] ^{:key member} [typing member])]) @@ -167,7 +168,7 @@ [view {:flexDirection :row} [icon :group st/group-icon] [text {:style st/members} - (let [cnt (count @contacts)] + (let [cnt (inc (count @contacts))] (str cnt (if (< 1 cnt) " members" diff --git a/src/status_im/chats_list/views/inner_item.cljs b/src/status_im/chats_list/views/inner_item.cljs index dd11cdbab3..a0794d5201 100644 --- a/src/status_im/chats_list/views/inner_item.cljs +++ b/src/status_im/chats_list/views/inner_item.cljs @@ -19,8 +19,8 @@ [icon :group st/group-icon]) (when group-chat [text {:style st/memebers-text} - (if (< 1 (count contacts)) - (str (count contacts) " members") + (if (< 0 (count contacts)) + (str (inc (count contacts)) " members") "1 member")])] [text {:style st/last-message-text :numberOfLines 2}