diff --git a/src/status_im/chat/handlers/receive_message.cljs b/src/status_im/chat/handlers/receive_message.cljs index 45dbb32b46..69d8fec6bd 100644 --- a/src/status_im/chat/handlers/receive_message.cljs +++ b/src/status_im/chat/handlers/receive_message.cljs @@ -83,6 +83,7 @@ :chat-id from})])))) (register-handler :received-message + (after #(dispatch [:update-suggestions])) (u/side-effect! (fn [db [_ message]] (add-message db message)))) diff --git a/src/status_im/chat/views/input/input.cljs b/src/status_im/chat/views/input/input.cljs index 4c9ea1b2f7..ba381c2b82 100644 --- a/src/status_im/chat/views/input/input.cljs +++ b/src/status_im/chat/views/input/input.cljs @@ -163,11 +163,7 @@ set-layout-height #(r/set-state component {:height %}) command (subscribe [:selected-chat-command])] (r/create-class - {:component-will-mount - (fn [] - (dispatch [:update-suggestions])) - - :reagent-render + {:reagent-render (fn [{:keys [anim-margin]}] (let [{:keys [width height]} (r/state component) command @command]