mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
@@ -520,16 +520,16 @@
|
||||
:did-update (fn [state]
|
||||
(let [next-theme (get-theme!)
|
||||
last-theme @(:last-theme state)
|
||||
editor (some-> state :editor-atom deref)]
|
||||
(when (and editor (not= next-theme last-theme))
|
||||
editor' (some-> state :editor-atom deref)]
|
||||
(when (and editor' (not= next-theme last-theme))
|
||||
(reset! (:last-theme state) next-theme)
|
||||
(.setOption editor "theme" next-theme)))
|
||||
(.setOption editor' "theme" next-theme)))
|
||||
(reset! (:code-options state) (last (:rum/args state)))
|
||||
(when-not (:file? (first (:rum/args state)))
|
||||
(let [code (nth (:rum/args state) 3)
|
||||
editor @(:editor-atom state)]
|
||||
(when (and editor (not= (.getValue editor) code))
|
||||
(.setValue editor code))))
|
||||
editor' @(:editor-atom state)]
|
||||
(when (and editor' (not= (.getValue editor') code))
|
||||
(.setValue editor' code))))
|
||||
state)}
|
||||
[state _config id attr code _theme _options]
|
||||
[:div.extensions__code
|
||||
|
||||
Reference in New Issue
Block a user