some improvements
This commit is contained in:
parent
6cd5e29c8a
commit
28a0d10367
|
@ -305,9 +305,8 @@
|
|||
(commands/unstage-command db staged-command)))
|
||||
|
||||
(register-handler :set-chat-command
|
||||
[(after #(dispatch [:command-edit-mode]))
|
||||
;(after #(dispatch [:animate-show-response]))
|
||||
]
|
||||
[(after invoke-suggestions-handler!)
|
||||
(after #(dispatch [:command-edit-mode]))]
|
||||
(fn [db [_ command-key]]
|
||||
(commands/set-chat-command db command-key)))
|
||||
|
||||
|
|
|
@ -41,12 +41,14 @@
|
|||
(if (and suggestions? (not= 0.1 current))
|
||||
identity inc))))))
|
||||
|
||||
(animation-handler :animate-show-response
|
||||
(register-handler :animate-show-response
|
||||
[(after #(dispatch [:command-edit-mode]))]
|
||||
(fn [db]
|
||||
(assoc db :messages-offset? true
|
||||
(fn [{:keys [current-chat-id] :as db}]
|
||||
(let [suggestions? (seq (get-in db [:suggestions current-chat-id]))
|
||||
height (if suggestions? middle-height minimum-suggestion-height)]
|
||||
(update db :animations assoc :messages-offset? true
|
||||
:messages-offset-max request-info-height
|
||||
:to-response-height response-height)))
|
||||
:to-response-height height))))
|
||||
|
||||
(defn fix-height
|
||||
[height-key height-signal-key suggestions-key minimum]
|
||||
|
@ -72,7 +74,6 @@
|
|||
(and under-middle-position?
|
||||
moving-down?)
|
||||
minimum)]
|
||||
(println height-key new-fixed)
|
||||
(-> db
|
||||
(assoc-in [:animations height-key] new-fixed)
|
||||
(update-in [:animations height-signal-key] inc)))))
|
||||
|
|
Loading…
Reference in New Issue