logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
31.45k stars 1.83k forks source link

Android app "system" theme mode doesn't work #5224

Open aaronbieber opened 2 years ago

aaronbieber commented 2 years ago

What happened?

I have the Android app configured to "system" theme mode (Settings -> General -> Theme modes -> system). Despite this, the theme mode never changes from dark. I have tried:

Reproduce the Bug

  1. Enter the Settings, and under General, and "Theme mode," select "system"
  2. Toggle the "Dark mode" Android setting
  3. Observe that Logseq does not match Android's theme setting, even after re-launching

Expected Behavior

I expect:

  1. The "system" theme matches the Android system's dark theme setting (e.g., selecting "system" in Logseq sets the Logseq theme to dark when the Android system is set to dark, and sets Logseq to light when the Android system is set to light)
  2. When Logseq gains focus (or wakes from background), the Logseq UI is again checked against the system setting if "system" is selected as the "Theme mode"

Screenshots

No response

Desktop Platform Information

No response

Mobile Platform Information

Google Pixel 6 Pro, Android version 12, build SP2A.220405.004 Logseq for Android 0.6.6

Additional Context

No response

KierPrev commented 2 years ago

Is your Android version a development/beta one? Mine responds well on Android 11.

aaronbieber commented 2 years ago

@KierPrev Nope this is official Android 12. Maybe something changed between 11 and 12, that could be a good clue.

andsofine commented 1 year ago

same here

situ2001 commented 1 year ago

Still having the problem on Android 13, I will try to fix it. Since I figure out that the code that detects (prefers-color-scheme: dark) is not working on Android Capacitor WebView.

(.-matches (js/window.matchMedia "(prefers-color-scheme: dark)")) ;; always false under Android app
cnrpman commented 1 year ago

Thanks. I just marked this PR with calling for review tag