From 9f35e0c9830180c8991d2a640b805ea17a0cce23 Mon Sep 17 00:00:00 2001 From: Herich Date: Thu, 27 Jul 2017 15:04:17 +0200 Subject: [PATCH] fix #1488 new_group: once-only handler for save --- src/status_im/new_group/screen_private.cljs | 5 ++++- src/status_im/new_group/views/chat_group_settings.cljs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/status_im/new_group/screen_private.cljs b/src/status_im/new_group/screen_private.cljs index ed99083ce3..3c2ac2ce2a 100644 --- a/src/status_im/new_group/screen_private.cljs +++ b/src/status_im/new_group/screen_private.cljs @@ -96,4 +96,7 @@ [sticky-button (label :t/save) (if (= group-type :contact-group) #(dispatch [:create-new-group group-name]) - #(dispatch [:create-new-group-chat group-name]))])])) + #(dispatch [:create-new-group-chat group-name])) + ;; once? set to true, so once component is mounted, on-press handler + ;; will be executed only once + true])])) diff --git a/src/status_im/new_group/views/chat_group_settings.cljs b/src/status_im/new_group/views/chat_group_settings.cljs index afa607d01f..c622e6d111 100644 --- a/src/status_im/new_group/views/chat_group_settings.cljs +++ b/src/status_im/new_group/views/chat_group_settings.cljs @@ -72,4 +72,7 @@ [view st/separator] [group-chat-settings-btns]]] (when save-btn-enabled? - [sticky-button (label :t/save) #(dispatch [:set-chat-name])])])) + [sticky-button (label :t/save) #(dispatch [:set-chat-name]) + ;; once? set to true, so once component is mounted, on-press handler + ;; will be executed only once + true])]))