fix: cannot save autostart of http server config

autostart checkbox also wasn't checked when set previously
Fixes https://github.com/logseq/db-test/issues/261.
https://github.com/logseq/logseq/issues/10337 looks like its already
fixed
This commit is contained in:
Gabriel Horner
2025-04-28 15:23:45 -04:00
parent 4b53a0b8e0
commit 25ad92ae09

View File

@@ -74,7 +74,7 @@
(not= (util/safe-parse-int (or port 0))
(util/safe-parse-int (or (:port server-state) 0))))
changed? (or hp-changed? (->> [autostart (:autostart server-state)]
(mapv #(cond-> % (nil? %) not))
(mapv #(cond-> % (nil? %) boolean))
(apply not=)))]
[:div.cp__server-configs-panel.pt-5
@@ -104,7 +104,7 @@
(ui/checkbox
{:on-change #(let [checked (.-checked (.-target %))]
(swap! *configs assoc :autostart checked))
:value (not (false? autostart))})
:checked (not (false? autostart))})
[:strong.select-none "Auto start server with the app launched"]]]