mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
Fix: android nav bar and status bar color (#7385)
* fix(android): set nav bar and status bar color Close #7382
This commit is contained in:
@@ -1114,7 +1114,7 @@ Similar to re-frame subscriptions"
|
||||
|
||||
(defn set-theme-mode!
|
||||
[mode]
|
||||
(when (mobile-util/native-ios?)
|
||||
(when (mobile-util/native-platform?)
|
||||
(if (= mode "light")
|
||||
(util/set-theme-light)
|
||||
(util/set-theme-dark)))
|
||||
@@ -1137,7 +1137,7 @@ Similar to re-frame subscriptions"
|
||||
(set-state! :ui/system-theme? false)
|
||||
(storage/set :ui/system-theme? false))))
|
||||
|
||||
(defn toggle-theme
|
||||
(defn- toggle-theme
|
||||
[theme]
|
||||
(if (= theme "dark") "light" "dark"))
|
||||
|
||||
@@ -1152,6 +1152,17 @@ Similar to re-frame subscriptions"
|
||||
(set-state! (if mode [:ui/custom-theme (keyword mode)] :ui/custom-theme) theme)
|
||||
(storage/set :ui/custom-theme (:ui/custom-theme @state))))
|
||||
|
||||
(defn restore-mobile-theme!
|
||||
"Restore mobile theme setting from local storage"
|
||||
[]
|
||||
(let [mode (or (storage/get :ui/theme) "light")
|
||||
system-theme? (storage/get :ui/system-theme?)]
|
||||
(when (and (not system-theme?)
|
||||
(mobile-util/native-platform?))
|
||||
(if (= mode "light")
|
||||
(util/set-theme-light)
|
||||
(util/set-theme-dark)))))
|
||||
|
||||
(defn set-editing-block-dom-id!
|
||||
[block-dom-id]
|
||||
(set-state! :editor/block-dom-id block-dom-id))
|
||||
|
||||
Reference in New Issue
Block a user