fix: Disabling journals not working

close #2646, #2665
pull/2664/head^2
Tienson Qin 2021-08-18 23:39:01 +08:00
parent 13dea5ebdd
commit a97b4fedea
1 changed files with 25 additions and 24 deletions

View File

@ -612,8 +612,9 @@
(defn create-today-journal! (defn create-today-journal!
[] []
(state/set-today! (date/today))
(when-let [repo (state/get-current-repo)] (when-let [repo (state/get-current-repo)]
(when (state/enable-journals? repo)
(state/set-today! (date/today))
(when (or (db/cloned? repo) (when (or (db/cloned? repo)
(and (or (config/local-db? repo) (and (or (config/local-db? repo)
(= "local" repo)) (= "local" repo))
@ -636,4 +637,4 @@
{:get-pos-fn (fn [] {:get-pos-fn (fn []
[page false false false]) [page false false false])
:page-block page}) :page-block page})
(ui-handler/re-render-root!)))))))) (ui-handler/re-render-root!)))))))))