Commands are not shown in group chat after member is added (#1031)

This commit is contained in:
alwx 2017-04-19 13:35:58 +03:00 committed by Roman Volosovskyi
parent 954acda50f
commit 9a80548cf3
2 changed files with 2 additions and 5 deletions

View File

@ -83,6 +83,7 @@
:chat-id from})])))) :chat-id from})]))))
(register-handler :received-message (register-handler :received-message
(after #(dispatch [:update-suggestions]))
(u/side-effect! (u/side-effect!
(fn [db [_ message]] (fn [db [_ message]]
(add-message db message)))) (add-message db message))))

View File

@ -163,11 +163,7 @@
set-layout-height #(r/set-state component {:height %}) set-layout-height #(r/set-state component {:height %})
command (subscribe [:selected-chat-command])] command (subscribe [:selected-chat-command])]
(r/create-class (r/create-class
{:component-will-mount {:reagent-render
(fn []
(dispatch [:update-suggestions]))
:reagent-render
(fn [{:keys [anim-margin]}] (fn [{:keys [anim-margin]}]
(let [{:keys [width height]} (r/state component) (let [{:keys [width height]} (r/state component)
command @command] command @command]