mirror of https://github.com/logseq/logseq
enhance: today's journal should be displayed quickly for new graph
parent
0b07eb76df
commit
724cfc2b58
|
@ -19,6 +19,7 @@
|
|||
[frontend.handler.editor :as editor-handler]
|
||||
[frontend.handler.notification :as notification]
|
||||
[frontend.handler.page :as page-handler]
|
||||
[frontend.handler.ui :as ui-handler]
|
||||
[frontend.spec :as spec]
|
||||
[frontend.state :as state]
|
||||
[frontend.ui :as ui]
|
||||
|
@ -163,7 +164,8 @@
|
|||
(page-handler/rename! old-title new-title))
|
||||
|
||||
(defmethod handle :page/create-today-journal [[_ repo]]
|
||||
(page-handler/create-today-journal!))
|
||||
(p/let [_ (page-handler/create-today-journal!)]
|
||||
(ui-handler/re-render-root!)))
|
||||
|
||||
(defmethod handle :file/not-matched-from-disk [[_ path disk-content db-content]]
|
||||
(state/clear-edit!)
|
||||
|
|
|
@ -378,7 +378,8 @@
|
|||
|
||||
(unfavorite-page! page-name)
|
||||
|
||||
(ok-handler)))))
|
||||
(ok-handler)
|
||||
(ui-handler/re-render-root!)))))
|
||||
|
||||
(defn- rename-page-aux [old-name new-name]
|
||||
(when-let [repo (state/get-current-repo)]
|
||||
|
|
|
@ -154,13 +154,12 @@
|
|||
(let [repo-dir (config/get-repo-dir repo-url)]
|
||||
(p/let [_ (fs/mkdir-if-not-exists (str repo-dir "/" config/app-name))
|
||||
_ (fs/mkdir-if-not-exists (str repo-dir "/" config/app-name "/" config/recycle-dir))
|
||||
_ (fs/mkdir-if-not-exists (str repo-dir "/" (config/get-journals-directory)))]
|
||||
(file-handler/create-metadata-file repo-url encrypted?)
|
||||
;; TODO: move to frontend.handler.file
|
||||
(create-config-file-if-not-exists repo-url)
|
||||
(create-contents-file repo-url)
|
||||
(create-favorites-file repo-url)
|
||||
(create-custom-theme repo-url)
|
||||
_ (fs/mkdir-if-not-exists (str repo-dir "/" (config/get-journals-directory)))
|
||||
_ (file-handler/create-metadata-file repo-url encrypted?)
|
||||
_ (create-config-file-if-not-exists repo-url)
|
||||
_ (create-contents-file repo-url)
|
||||
_ (create-favorites-file repo-url)
|
||||
_ (create-custom-theme repo-url)]
|
||||
(state/pub-event! [:page/create-today-journal repo-url])))))
|
||||
|
||||
(defn- remove-non-exists-refs!
|
||||
|
|
Loading…
Reference in New Issue