Skip to content

Commit

Permalink
fix(ux): ordered list conditions for checking the moved blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 committed Apr 27, 2023
1 parent ee81de9 commit 04c0e50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/frontend/modules/outliner/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[frontend.modules.outliner.utils :as outliner-u]
[frontend.state :as state]
[frontend.util :as util]
[frontend.util.property :as property]
[logseq.graph-parser.util :as gp-util]
[cljs.spec.alpha :as s]))

Expand Down Expand Up @@ -415,11 +416,12 @@
(letfn [(list-type-fn [b] (some-> b :block/properties :logseq.order-list-type))]
(if-let [list-type (and target-block (list-type-fn target-block))]
(mapv
(fn [block]
(fn [{:block/keys [content format] :as block}]
(cond-> block
(and (some? (:block/uuid block))
(nil? (list-type-fn block)))
(update :block/properties #(assoc % :logseq.order-list-type list-type))))
(-> (update :block/properties #(assoc % :logseq.order-list-type list-type))
(assoc :block/content (property/insert-property format content :logseq.order-list-type list-type)))))
blocks)
blocks))))

Expand Down

0 comments on commit 04c0e50

Please sign in to comment.