mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 08:04:40 +00:00
Always add target of redirect-to-page! to 'Recent' list.
This change will put way more visited pages in the 'Recent' list, which (to me) feels better than the current behaviour.
This commit is contained in:
committed by
Tienson Qin
parent
60d3f1f60e
commit
d7759aeb79
@@ -3,6 +3,7 @@
|
||||
[frontend.date :as date]
|
||||
[frontend.db :as db]
|
||||
[frontend.handler.ui :as ui-handler]
|
||||
[frontend.handler.recent :as recent-handler]
|
||||
[frontend.handler.search :as search-handler]
|
||||
[frontend.state :as state]
|
||||
[frontend.text :as text]
|
||||
@@ -28,13 +29,16 @@
|
||||
|
||||
(defn redirect-to-page!
|
||||
([page-name]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}}))
|
||||
([page-name anchor]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}
|
||||
:query-params {:anchor anchor}}))
|
||||
([page-name anchor push]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}
|
||||
:query-params {:anchor anchor}
|
||||
|
||||
Reference in New Issue
Block a user