fix message offset

Former-commit-id: 026b678e20
This commit is contained in:
Roman Volosovskyi 2016-06-29 09:36:03 +03:00
parent e90ecc5ce9
commit 579269ebca
2 changed files with 4 additions and 3 deletions

View File

@ -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]))]

View File

@ -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))))))