mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 02:46:45 +00:00
fix: remove *block-cache in ui-thread
This commit is contained in:
@@ -20,11 +20,15 @@
|
||||
~qualified-keyword-name
|
||||
(fn ~(symbol (str "thread-api--" (name qualified-keyword-name))) ~params ~@body)))
|
||||
|
||||
|
||||
#?(:cljs (def *profile (volatile! {})))
|
||||
|
||||
#?(:cljs
|
||||
(defn remote-function
|
||||
"Return a promise whose value is transit-str."
|
||||
[qualified-kw-str args-direct-passthrough? args-transit-str-or-args-array]
|
||||
(let [qkw (keyword qualified-kw-str)]
|
||||
(vswap! *profile update qkw inc)
|
||||
(if-let [f (@*thread-apis qkw)]
|
||||
(let [result (apply f (cond-> args-transit-str-or-args-array
|
||||
(not args-direct-passthrough?) ldb/read-transit-str))
|
||||
|
||||
Reference in New Issue
Block a user