|
@@ -253,9 +253,9 @@
|
|
|
|
|
|
(defn- undo-redo-aux
|
|
(defn- undo-redo-aux
|
|
[repo undo?]
|
|
[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))]
|
|
(if-let [op (not-empty ((if undo? pop-undo-op pop-redo-op) repo))]
|
|
(let [conn (db/get-db repo false)]
|
|
(let [conn (db/get-db repo false)]
|
|
|
|
+ (prn :debug :undo-op op)
|
|
(cond
|
|
(cond
|
|
(= ::ui-state (ffirst op))
|
|
(= ::ui-state (ffirst op))
|
|
(do
|
|
(do
|
|
@@ -287,6 +287,7 @@
|
|
{:undo? undo?
|
|
{:undo? undo?
|
|
:editor-cursors editor-cursors
|
|
:editor-cursors editor-cursors
|
|
:block-content block-content}))]
|
|
:block-content block-content}))]
|
|
|
|
+ (prn :debug :reversed-tx-data reversed-tx-data)
|
|
(when (seq reversed-tx-data)
|
|
(when (seq reversed-tx-data)
|
|
(if util/node-test?
|
|
(if util/node-test?
|
|
(do
|
|
(do
|
|
@@ -333,9 +334,9 @@
|
|
[repo {:keys [tx-data tx-meta db-after db-before]}]
|
|
[repo {:keys [tx-data tx-meta db-after db-before]}]
|
|
(let [{:keys [outliner-op]} tx-meta]
|
|
(let [{:keys [outliner-op]} tx-meta]
|
|
#_(prn :gen-undo
|
|
#_(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
|
|
(when (and
|
|
(= (:client-id tx-meta) (:client-id @state/state))
|
|
(= (:client-id tx-meta) (:client-id @state/state))
|
|
outliner-op
|
|
outliner-op
|