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:
Moritz Ulrich
2021-12-03 10:20:08 +01:00
committed by Tienson Qin
parent 60d3f1f60e
commit d7759aeb79
3 changed files with 4 additions and 5 deletions

View File

@@ -34,7 +34,6 @@
[frontend.components.plugins :as plugins]
[frontend.handler.plugin :as plugin-handler]
[frontend.handler.block :as block-handler]
[frontend.handler.recent :as recent-handler]
[frontend.handler.dnd :as dnd]
[frontend.handler.editor :as editor-handler]
[frontend.handler.repeated :as repeated]
@@ -381,8 +380,6 @@
:on-mouse-down
(fn [e]
(util/stop e)
(when redirect-page-name
(recent-handler/add-page-to-recent! (state/get-current-repo) redirect-page-name))
(let [create-first-block! (fn []
(when-not (editor-handler/add-default-title-property-if-needed! redirect-page-name)
(editor-handler/insert-first-page-block-if-not-exists! redirect-page-name)))]