mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
enhance(sync): align db-sync/undo tests and lint
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
[frontend.db :as db]
|
||||
[frontend.handler.editor :as editor-handler]
|
||||
[frontend.state :as state]
|
||||
[frontend.undo-redo :as undo-redo]
|
||||
[frontend.util :as util]
|
||||
[goog.dom :as gdom]))
|
||||
|
||||
@@ -30,9 +29,12 @@
|
||||
;; skip recording editor info when undo or redo is still running
|
||||
(when-not (contains? #{:undo :redo} @(:editor/op @state/state))
|
||||
(let [page-id (:block/uuid (:block/page (db/entity (:db/id (state/get-edit-block)))))
|
||||
repo (state/get-current-repo)]
|
||||
repo (state/get-current-repo)
|
||||
editor-info (state/get-editor-info)]
|
||||
(when page-id
|
||||
(undo-redo/record-editor-info! repo (state/get-editor-info)))))
|
||||
(state/<invoke-db-worker :thread-api/undo-redo-record-editor-info
|
||||
repo
|
||||
editor-info))))
|
||||
(state/set-state! :editor/op nil))
|
||||
state)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user