Browse Source

fix: undo cycle todos

Tienson Qin 3 years ago
parent
commit
7e8b355e0d
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/main/frontend/handler/editor.cljs

+ 5 - 4
src/main/frontend/handler/editor.cljs

@@ -737,10 +737,11 @@
     (let [ids (->> (distinct (map #(when-let [id (dom/attr % "blockid")]
     (let [ids (->> (distinct (map #(when-let [id (dom/attr % "blockid")]
                                      (uuid id)) blocks))
                                      (uuid id)) blocks))
                    (remove nil?))]
                    (remove nil?))]
-      (doseq [id ids]
-        (let [block (db/pull [:block/uuid id])]
-          (when (not-empty (:block/content block))
-            (set-marker block)))))))
+      (outliner-tx/transact! {:outliner-op :cycle-todos}
+        (doseq [id ids]
+          (let [block (db/pull [:block/uuid id])]
+            (when (not-empty (:block/content block))
+              (set-marker block))))))))
 
 
 (defn cycle-todo!
 (defn cycle-todo!
   []
   []