Magic suggestions area (#772)
This commit is contained in:
parent
ace355515a
commit
27ddb24f7b
|
@ -239,14 +239,11 @@
|
|||
(register-sub :input-margin
|
||||
(fn []
|
||||
(let [kb-height (subscribe [:get :keyboard-height])
|
||||
focused (subscribe [:get :focused])
|
||||
mode (subscribe [:kb-mode])
|
||||
kb-max (subscribe [:get :keyboard-max-height])
|
||||
show-emoji? (subscribe [:chat-ui-props :show-emoji?])]
|
||||
(reaction
|
||||
(cond @show-emoji? (or @kb-max c/emoji-container-height)
|
||||
ios? @kb-height
|
||||
(and @focused (= :pan @mode) (pos? @kb-height)) 20
|
||||
:else 0)))))
|
||||
|
||||
(register-sub :max-layout-height
|
||||
|
|
|
@ -151,10 +151,20 @@
|
|||
(when (seq suggestions) suggestions))
|
||||
|
||||
(defn response-view []
|
||||
(let [response-height (anim/create-value c/input-height)]
|
||||
[container response-height
|
||||
[request-info response-height]
|
||||
[suggestions-web-view]
|
||||
[response-suggestions-view]
|
||||
[cv/validation-messages]
|
||||
[placeholder]]))
|
||||
(let [response-height (anim/create-value c/input-height)
|
||||
command (subscribe [:get-chat-command])
|
||||
suggestions (subscribe [:get-content-suggestions])
|
||||
errors (subscribe [:validation-errors])
|
||||
custom-errors (subscribe [:custom-validation-errors])]
|
||||
(fn []
|
||||
(when (or (:fullscreen @command)
|
||||
(= :response (:type @command))
|
||||
(seq @suggestions)
|
||||
(seq @errors)
|
||||
(seq @custom-errors))
|
||||
[container response-height
|
||||
[request-info response-height]
|
||||
[suggestions-web-view]
|
||||
[response-suggestions-view]
|
||||
[cv/validation-messages]
|
||||
[placeholder]]))))
|
||||
|
|
Loading…
Reference in New Issue