fix #1488 new_group: once-only handler for save

This commit is contained in:
Herich 2017-07-27 15:04:17 +02:00 committed by Roman Volosovskyi
parent 7eb5cdb9ab
commit 9f35e0c983
2 changed files with 8 additions and 2 deletions

View File

@ -96,4 +96,7 @@
[sticky-button (label :t/save) [sticky-button (label :t/save)
(if (= group-type :contact-group) (if (= group-type :contact-group)
#(dispatch [:create-new-group group-name]) #(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])]))

View File

@ -72,4 +72,7 @@
[view st/separator] [view st/separator]
[group-chat-settings-btns]]] [group-chat-settings-btns]]]
(when save-btn-enabled? (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])]))