mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: can't undo/redo imported edn data
also UI doesn't refresh
This commit is contained in:
committed by
Gabriel Horner
parent
b649887b15
commit
fe619d3a92
@@ -253,9 +253,9 @@
|
||||
|
||||
(defn- undo-redo-aux
|
||||
[repo undo?]
|
||||
(prn :undo-op (not-empty ((if undo? pop-undo-op pop-redo-op) repo)))
|
||||
(if-let [op (not-empty ((if undo? pop-undo-op pop-redo-op) repo))]
|
||||
(let [conn (db/get-db repo false)]
|
||||
(prn :debug :undo-op op)
|
||||
(cond
|
||||
(= ::ui-state (ffirst op))
|
||||
(do
|
||||
@@ -287,6 +287,7 @@
|
||||
{:undo? undo?
|
||||
:editor-cursors editor-cursors
|
||||
:block-content block-content}))]
|
||||
(prn :debug :reversed-tx-data reversed-tx-data)
|
||||
(when (seq reversed-tx-data)
|
||||
(if util/node-test?
|
||||
(do
|
||||
@@ -333,9 +334,9 @@
|
||||
[repo {:keys [tx-data tx-meta db-after db-before]}]
|
||||
(let [{:keys [outliner-op]} tx-meta]
|
||||
#_(prn :gen-undo
|
||||
(= (:client-id tx-meta) (:client-id @state/state))
|
||||
outliner-op
|
||||
tx-meta)
|
||||
(= (:client-id tx-meta) (:client-id @state/state))
|
||||
outliner-op
|
||||
tx-meta)
|
||||
(when (and
|
||||
(= (:client-id tx-meta) (:client-id @state/state))
|
||||
outliner-op
|
||||
|
||||
@@ -501,7 +501,9 @@
|
||||
(or from-disk? new-graph?)
|
||||
{:tx-report tx-report}
|
||||
|
||||
(or (::gp-exporter/new-graph? tx-meta) (::sqlite-export/imported-data? tx-meta))
|
||||
(or (::gp-exporter/new-graph? tx-meta)
|
||||
(and (::sqlite-export/imported-data? tx-meta)
|
||||
(not= :batch-import-edn (:outliner-op tx-meta))))
|
||||
(invoke-hooks-for-imported-graph conn tx-report)
|
||||
|
||||
:else
|
||||
|
||||
Reference in New Issue
Block a user