Browse Source

fix: can't open recent pages on desktop

Closed https://github.com/logseq/logseq/issues/1206
Tienson Qin 4 years ago
parent
commit
6147d0cd6a

+ 2 - 2
src/main/frontend/components/right_sidebar.cljs

@@ -63,14 +63,14 @@
          [:a.mb-1 {:key (str "recent-page-" page)
                    :href (rfe/href :page {:name page})
                    :on-click (fn [e]
-                               (.preventDefault e)
                                (when (gobj/get e "shiftKey")
                                  (when-let [page (db/pull [:page/name (string/lower-case page)])]
                                    (state/sidebar-add-block!
                                     (state/get-current-repo)
                                     (:db/id page)
                                     :page
-                                    {:page page}))))}
+                                    {:page page}))
+                                 (.preventDefault e)))}
           page]))]))
 
 (rum/defc contents < rum/reactive db-mixins/query

+ 2 - 1
src/main/frontend/db/model.cljs

@@ -127,7 +127,8 @@
   [repo]
   (when-let [conn (conn/get-conn repo)]
     (->> (d/q
-          '[:find ?path ?modified-at
+           '[:find ?path
+             ;; ?modified-at
             :where
             [?file :file/path ?path]
             ;; [?file :file/last-modified-at ?modified-at]