diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 1a870b388..cd3ad016b 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -339,7 +339,9 @@ content (if (and (seq properties) real-content (not= real-content content)) (property/with-built-in-properties properties content format) content) - content (drawer/with-logbook block content) + content (->> content + (drawer/remove-logbook) + (drawer/with-logbook block)) content (with-timetracking block content) first-block? (= left page) ast (mldoc/->edn (string/trim content) (mldoc/default-config format)) @@ -800,11 +802,9 @@ (defn check [{:block/keys [uuid marker content format repeated?] :as block}] (let [new-content (string/replace-first content marker "DONE") - new-content (-> - (if repeated? - (update-timestamps-content! block content) - new-content) - (with-marker-time block format "DONE" marker))] + new-content (if repeated? + (update-timestamps-content! block content) + new-content)] (save-block-if-changed! block new-content))) (defn uncheck @@ -812,8 +812,7 @@ (let [marker (if (= :now (state/get-preferred-workflow)) "LATER" "TODO") - new-content (-> (string/replace-first content "DONE" marker) - (with-marker-time block format marker "DONE"))] + new-content (string/replace-first content "DONE" marker)] (save-block-if-changed! block new-content))) (defn cycle-todo! diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 74d1e0d46..8244f403f 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -574,7 +574,7 @@ (rum/local false ::collapsed?) {:will-mount (fn [state] (let [args (:rum/args state)] - (when (true? (last args)) + (when (true? (:default-collapsed? (last args))) (reset! (get state ::collapsed?) true))) state)} [state header content {:keys [default-collapsed? title-trigger?]}]