File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
deps/outliner/src/logseq/outliner Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 240240(defn- remove-inline-page-classes
241241 [db {:block/keys [tags] :as block}]
242242 ; ; Notice: should check `page?` for block from the current db
243- (if (ldb/page? (d/entity db (:db/id block)))
243+ (if (or ( ldb/page? (d/entity db (:db/id block))) ( :block/name block ))
244244 block
245245 (let [tags' (cond
246246 (or (integer? tags)
922922 (let [target-block (d/entity db (:db/id target-block))
923923 block (d/entity db (:db/id block))]
924924 (if (or
925- ; ; target-block doesn't have parent or moving non-page block to library
926- (and sibling? (or (nil? (:block/parent target-block))
927- (and (not (ldb/page? block))
928- (ldb/library? (:block/parent target-block)))))
925+ ; ; target-block doesn't have parent
926+ (and sibling? (nil? (:block/parent target-block)))
929927 ; ; move page to be a child of block
930928 (and (not sibling?)
931929 (not (ldb/page? target-block))
Original file line number Diff line number Diff line change 183183 page-tag-update? (and (= :block/tags (:a datom))
184184 (= (:db/id page-tag) (:v datom)))
185185 move-to-library? (and (= :block/parent (:a datom))
186- (or (= (:db/id library-page) (:v datom))
187- (and
188- (ldb/page? (d/entity db (:v datom)))
189- (let [parents (->> (ldb/get-block-parents db (:block/uuid (d/entity db (:v datom))))
190- (map :db/id )
191- (set ))]
192- (contains? parents (:db/id library-page)))))
193-
186+ (= (:db/id library-page) (:v datom))
194187 (:added datom))]
195188 (when (or page-tag-update? move-to-library?)
196189 (let [block-before (d/entity db-before id)
You can’t perform that action at this time.
0 commit comments