chore: deprecate fn warning

pull/2747/head
Weihua Lu 2021-08-31 10:31:55 +08:00
parent d87b341f7b
commit 82b2f8ca77
2 changed files with 8 additions and 3 deletions

View File

@ -48,6 +48,9 @@
[]
(let [open? (state/sub :ui/command-palette-open?)]
(if open?
(state/set-modal! #(command-palette {:commands (cp/get-commands)}) false false)
(state/set-modal!
#(command-palette {:commands (cp/get-commands)})
{:fullscreen? false
:close-btn? false})
(state/close-modal!))
nil))

View File

@ -1065,8 +1065,10 @@
(defn set-modal!
([modal-panel-content]
(set-modal! modal-panel-content false true))
([modal-panel-content fullscreen? close-btn?]
(set-modal! modal-panel-content
{:fullscreen? false
:close-btn? true}))
([modal-panel-content {:keys [fullscreen? close-btn?]}]
(swap! state assoc
:modal/show? (boolean modal-panel-content)
:modal/panel-content modal-panel-content