mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
implement search bridge for swift <> cljs
This commit is contained in:
@@ -27,14 +27,15 @@
|
||||
(show! content status clear? uid timeout nil))
|
||||
([content status clear? uid timeout close-cb]
|
||||
(assert (keyword? status) "status should be a keyword")
|
||||
(let [contents (state/get-notification-contents)
|
||||
uid (or uid (keyword (util/unique-id)))]
|
||||
(state/set-state! :notification/contents (assoc contents
|
||||
uid {:content content
|
||||
:status status
|
||||
:close-cb close-cb}))
|
||||
;; (let [contents (state/get-notification-contents)
|
||||
;; uid (or uid (keyword (util/unique-id)))]
|
||||
;; (state/set-state! :notification/contents (assoc contents
|
||||
;; uid {:content content
|
||||
;; :status status
|
||||
;; :close-cb close-cb}))
|
||||
|
||||
(when (and (not= status :error) (not (false? clear?)))
|
||||
(js/setTimeout #(clear! uid) (or timeout 2000)))
|
||||
;; (when (and (not= status :error) (not (false? clear?)))
|
||||
;; (js/setTimeout #(clear! uid) (or timeout 2000)))
|
||||
|
||||
uid)))
|
||||
;; uid)
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user