fix lint warnings

pull/4423/head
llcc 2022-02-25 12:04:12 +08:00 committed by Tienson Qin
parent ff001849ed
commit 1fd0c47925
1 changed files with 12 additions and 12 deletions

View File

@ -769,24 +769,24 @@
(let [new-content (string/replace-first content marker "DONE") (let [new-content (string/replace-first content marker "DONE")
new-content (if repeated? new-content (if repeated?
(update-timestamps-content! block content) (update-timestamps-content! block content)
new-content)] new-content)
(let [input-id (state/get-edit-input-id)] input-id (state/get-edit-input-id)]
(if (and input-id (if (and input-id
(string/ends-with? input-id (str uuid))) (string/ends-with? input-id (str uuid)))
(state/set-edit-content! input-id new-content) (state/set-edit-content! input-id new-content)
(save-block-if-changed! block new-content))))) (save-block-if-changed! block new-content))))
(defn uncheck (defn uncheck
[{:block/keys [content uuid] :as block}] [{:block/keys [content uuid] :as block}]
(let [marker (if (= :now (state/get-preferred-workflow)) (let [marker (if (= :now (state/get-preferred-workflow))
"LATER" "LATER"
"TODO") "TODO")
new-content (string/replace-first content "DONE" marker)] new-content (string/replace-first content "DONE" marker)
(let [input-id (state/get-edit-input-id)] input-id (state/get-edit-input-id)]
(if (and input-id (if (and input-id
(string/ends-with? input-id (str uuid))) (string/ends-with? input-id (str uuid)))
(state/set-edit-content! input-id new-content) (state/set-edit-content! input-id new-content)
(save-block-if-changed! block new-content))))) (save-block-if-changed! block new-content))))
(defn set-marker (defn set-marker
[{:block/keys [marker content] :as block} new-marker] [{:block/keys [marker content] :as block} new-marker]