mirror of https://github.com/logseq/logseq
fix: bullet blink when creating a new block
parent
45348a694b
commit
83d128ecb0
|
@ -3028,7 +3028,9 @@
|
|||
(block-mouse-leave e *control-show? block-id doc-mode?))}
|
||||
(when (and (not slide?) (not in-whiteboard?) (not hidden?))
|
||||
(block-control config block uuid block-id collapsed? *control-show?
|
||||
(or edit? (= uuid (:block/uuid (state/get-edit-block))))))
|
||||
(or edit?
|
||||
(= uuid (:block/uuid (state/get-edit-block)))
|
||||
(contains? @(:editor/new-created-blocks @state/state) uuid))))
|
||||
(when (and @*show-left-menu? (not in-whiteboard?) (not hidden?))
|
||||
(block-left-menu config block))
|
||||
|
||||
|
|
|
@ -55,6 +55,13 @@
|
|||
(when-not (or undo? redo?)
|
||||
(update-current-tx-editor-cursor! tx-report)))
|
||||
|
||||
(let [new-datoms (filter (fn [datom]
|
||||
(and
|
||||
(= :block/uuid (:a datom))
|
||||
(true? (:added datom)))) tx-data)]
|
||||
(when (seq new-datoms)
|
||||
(state/set-state! :editor/new-created-blocks (set (map :v new-datoms)))))
|
||||
|
||||
(let [pages (set (keep #(when (= :block/name (:a %)) (:v %)) tx-data))]
|
||||
(when (seq pages)
|
||||
(mark-pages-as-loaded! repo pages)))
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
|
||||
:db/properties-changed-pages {}
|
||||
:editor/cursor-range (atom nil)
|
||||
:editor/new-created-blocks (atom #{})
|
||||
|
||||
:selection/mode (atom false)
|
||||
;; Warning: blocks order is determined when setting this attribute
|
||||
|
|
Loading…
Reference in New Issue