Просмотр исходного кода

fix: don't add #Task to blocks when modifying status/deadline

and scheduled.

Notice that #Task is still added when adding those properties
initially when the block doesn't have other tags that have those properties.
Tienson Qin 8 месяцев назад
Родитель
Сommit
8a5e38af31
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      deps/outliner/src/logseq/outliner/property.cljs

+ 2 - 1
deps/outliner/src/logseq/outliner/property.cljs

@@ -40,7 +40,8 @@
                             true
                             (assoc property-id value)
                             (and (contains? #{:logseq.property/status :logseq.property/scheduled :logseq.property/deadline} property-id)
-                                 (or (empty? (:block/tags block)) (ldb/internal-page? block)))
+                                 (or (empty? (:block/tags block)) (ldb/internal-page? block))
+                                 (not (get (d/pull @conn [property-id] (:db/id block)) property-id)))
                             (assoc :block/tags :logseq.class/Task))]
       (cond-> []
         multiple-values-empty?