blokadaorg / blokada

The official repo for Blokada apps.
https://blokada.org
3.04k stars 212 forks source link

Blokada does not change theme dynamically #893

Closed soredake closed 1 year ago

soredake commented 2 years ago

When android theme changes to dark blokada's theme is still staying light, even when "system theme" is selected in options.

kar commented 2 years ago

What device, os?

soredake commented 2 years ago

Redmi Note 5 Pro, crdroid (android 11)

qwerty287 commented 2 years ago

Same here, stock android 11

kar commented 2 years ago

Do you restart the app fully? You need to kill the app if VPN is established or Keep Alive is enabled.

qwerty287 commented 2 years ago

OK, if I kill the app it works. But that's not a very nice behavior. Usually, android apps automatically switch to dark ui if it is changed, without an app restart or even an app kill. Actually, Android handles this exactly like this if you do not change it manually and if you have the theme declarations in both directories values and values-night.

kar commented 2 years ago

Yep but you are talking about only some recent Android versions and only some device models. Theme handling has been historically very inconsistent in Android. We have done it with a separate library in order to support a broader range of devices. We may revisit it and go back to Android native way once the more recent Android versions are more common.

soredake commented 2 years ago

once the more recent Android versions are more common.

https://www.xda-developers.com/android-distribution-numbers-2021/

soredake commented 1 year ago

Blokada 5/6 now dynamically changes theme, closing.