Przeglądaj źródła

fix: hiding #Task on mobile affects desktop

Don't hide #Task on desktop which is still useful.
Rather default mobile to hiding which has the added benefit
of handling other tags e.g. #Query.  Follow up to #11903
Gabriel Horner 6 miesięcy temu
rodzic
commit
da7f9f1dcd

+ 1 - 2
deps/db/src/logseq/db/frontend/class.cljs

@@ -37,8 +37,7 @@
 
      :logseq.class/Task
      {:title "Task"
-      :schema {:properties [:logseq.property/status :logseq.property/priority :logseq.property/deadline :logseq.property/scheduled]}
-      :properties {:logseq.property.class/hide-from-node true}}
+      :schema {:properties [:logseq.property/status :logseq.property/priority :logseq.property/deadline :logseq.property/scheduled]}}
 
      :logseq.class/Query
      {:title "Query"

+ 4 - 1
src/main/frontend/components/block.cljs

@@ -2844,7 +2844,10 @@
                       (:block/tags block)
                       (remove (fn [t]
                                 (or (ldb/inline-tag? (:block/raw-title block) t)
-                                    (:logseq.property.class/hide-from-node t)
+                                    (if (contains? t :logseq.property.class/hide-from-node)
+                                      (:logseq.property.class/hide-from-node t)
+                                      ;; Mobile app hides by default while everything else doesn't
+                                      (if (util/capacitor-new?) true false))
                                     (contains? hidden-internal-tags (:db/ident t))
                                     (and (util/mobile?) (= (:db/ident t) :logseq.class/Task))))))
           popup-opts {:align :end