mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 10:26:35 +00:00
refactor: build tx-data in db-worker instead of the UI thread
So the tx-data will be built on top of the full db instead of the partial db from the UI thread, it also reduces the risk to use outdated data since RTC can transact data from the worker.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
[frontend.mobile.haptics :as haptics]
|
||||
[logseq.outliner.core :as outliner-core]
|
||||
[frontend.modules.outliner.ui :as ui-outliner-tx]
|
||||
[frontend.modules.outliner.op :as outliner-op]
|
||||
[frontend.state :as state]
|
||||
[frontend.util :as util]
|
||||
[frontend.util.drawer :as drawer]
|
||||
@@ -334,12 +335,10 @@
|
||||
{:outliner-op :move-blocks
|
||||
:real-outliner-op :indent-outdent}
|
||||
(when save-current-block (save-current-block))
|
||||
(outliner-core/indent-outdent-blocks! (state/get-current-repo)
|
||||
(db/get-db false)
|
||||
(get-top-level-blocks blocks)
|
||||
indent?
|
||||
{:parent-original (get-first-block-original)
|
||||
:logical-outdenting? (state/logical-outdenting?)})))))
|
||||
(outliner-op/indent-outdent-blocks! (get-top-level-blocks blocks)
|
||||
indent?
|
||||
{:parent-original (get-first-block-original)
|
||||
:logical-outdenting? (state/logical-outdenting?)})))))
|
||||
|
||||
(def *swipe (atom nil))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user