From 579269ebca8dcc57fb7635dadd37d814943c61ef Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 29 Jun 2016 09:36:03 +0300 Subject: [PATCH] fix message offset Former-commit-id: 026b678e2079a1e0216307a41a0efba8e064bdab --- src/status_im/chat/handlers/animation.cljs | 2 +- src/status_im/chat/subs.cljs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/status_im/chat/handlers/animation.cljs b/src/status_im/chat/handlers/animation.cljs index 837991d98b..ec9f40289c 100644 --- a/src/status_im/chat/handlers/animation.cljs +++ b/src/status_im/chat/handlers/animation.cljs @@ -43,7 +43,7 @@ type (get-in db path)] (if (= :response type) minimum-suggestion-height - minimum-command-suggestions-height))) + 0.1))) (register-handler :animate-show-response [(after #(dispatch [:command-edit-mode]))] diff --git a/src/status_im/chat/subs.cljs b/src/status_im/chat/subs.cljs index ee803b5cd7..d8c5b545cb 100644 --- a/src/status_im/chat/subs.cljs +++ b/src/status_im/chat/subs.cljs @@ -131,11 +131,12 @@ (fn [] (let [command? (subscribe [:command?]) command (subscribe [:get-chat-command]) + command-suggestions (subscribe [:get-content-suggestions]) suggestions (subscribe [:get-suggestions])] - ;; todo fix magic values (reaction (let [type (:type @command)] (cond (and @command? (= type :response)) c/request-info-height - (and @command? (= type :command)) c/suggestions-header-height + (and @command? (= type :command) (seq @command-suggestions)) + c/suggestions-header-height (seq @suggestions) c/suggestions-header-height :else 0))))))