This commit is contained in:
parent
7da40ce7fa
commit
63bf882e65
|
@ -487,7 +487,9 @@
|
||||||
(when dapp-url
|
(when dapp-url
|
||||||
(am/go
|
(am/go
|
||||||
(dispatch [:select-chat-input-command
|
(dispatch [:select-chat-input-command
|
||||||
(assoc (:browse global-commands) :prefill [dapp-url])])
|
(assoc (:browse global-commands) :prefill [dapp-url])
|
||||||
|
nil
|
||||||
|
true])
|
||||||
(a/<! (a/timeout 100))
|
(a/<! (a/timeout 100))
|
||||||
(dispatch [:send-current-message])))))))
|
(dispatch [:send-current-message])))))))
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
:select-chat-input-command
|
:select-chat-input-command
|
||||||
(handlers/side-effect!
|
(handlers/side-effect!
|
||||||
(fn [{:keys [current-chat-id chat-ui-props] :as db}
|
(fn [{:keys [current-chat-id chat-ui-props] :as db}
|
||||||
[_ {:keys [prefill sequential-params] :as command} metadata]]
|
[_ {:keys [prefill sequential-params] :as command} metadata prevent-auto-focus?]]
|
||||||
(dispatch [:set-chat-input-text (str (chat-utils/command-name command)
|
(dispatch [:set-chat-input-text (str (chat-utils/command-name command)
|
||||||
const/spacing-char
|
const/spacing-char
|
||||||
(when-not sequential-params
|
(when-not sequential-params
|
||||||
|
@ -51,10 +51,12 @@
|
||||||
(dispatch [:load-chat-parameter-box command 0])
|
(dispatch [:load-chat-parameter-box command 0])
|
||||||
(if sequential-params
|
(if sequential-params
|
||||||
(js/setTimeout
|
(js/setTimeout
|
||||||
#(do (dispatch [:chat-input-focus :seq-input-ref])
|
#(do (when-not prevent-auto-focus?
|
||||||
|
(dispatch [:chat-input-focus :seq-input-ref]))
|
||||||
(dispatch [:set-chat-seq-arg-input-text (str/join const/spacing-char prefill)]))
|
(dispatch [:set-chat-seq-arg-input-text (str/join const/spacing-char prefill)]))
|
||||||
100)
|
100)
|
||||||
(dispatch [:chat-input-focus :input-ref])))))
|
(when-not prevent-auto-focus?
|
||||||
|
(dispatch [:chat-input-focus :input-ref]))))))
|
||||||
|
|
||||||
(handlers/register-handler
|
(handlers/register-handler
|
||||||
:set-chat-input-metadata
|
:set-chat-input-metadata
|
||||||
|
|
Loading…
Reference in New Issue