Browse Source

fix(editor): move scheduled and deadline to custom queries

Resolved https://github.com/logseq/logseq/issues/514
Tienson Qin 5 years ago
parent
commit
36156f5976
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/main/frontend/db.cljs

+ 9 - 9
src/main/frontend/db.cljs

@@ -1742,15 +1742,15 @@
   (when-let [date (date/journal-title->int journal-title)]
     (when-let [repo (state/get-current-repo)]
       (when-let [conn (get-conn repo)]
-        (->> (d/q
-              '[:find (pull ?block [*])
-                :in $ ?day
-                :where
-                (or
-                 [?block :block/scheduled ?day]
-                 [?block :block/deadline ?day])]
-              conn
-              date)
+        (->> (q repo [:custom :scheduled-deadline journal-title] {}
+                '[:find (pull ?block [*])
+                  :in $ ?day
+                  :where
+                  (or
+                   [?block :block/scheduled ?day]
+                   [?block :block/deadline ?day])]
+                date)
+             react
              seq-flatten
              sort-blocks
              group-by-page