helloworld1 / FreeOTPPlus

Enhanced fork of FreeOTP-Android providing a feature-rich 2FA authenticator
Apache License 2.0
653 stars 75 forks source link

[Bug] Dark mode - follow system #255

Closed kudlav closed 1 year ago

kudlav commented 1 year ago

Add option to "Follow system" dark/light theme. System dark/light theme can be e.g. switched by plan, manually or after sunrise. The app should allow to follow the system theme.

https://developer.android.com/develop/ui/views/theming/darktheme#change-themes

helloworld1 commented 1 year ago

I think it already supports follow system. If you uncheck the "Use dark theme" it will use the system theme

kudlav commented 1 year ago

If you uncheck "Use dark theme" it's always in the light theme.

Google Pixel 7a Android 14 FreeOTP+ v3.0

kudlav commented 1 year ago

@helloworld1 please, reopen this issue

helloworld1 commented 1 year ago

I tested this on the emulator and Galaxy S21 and FreeOTP 3.0. It follows the system fine after unchecking the dark mode option. Here is the commit for reference https://github.com/helloworld1/FreeOTPPlus/commit/f04a154640789918c2975b30f7351e81a67c540e

kudlav commented 1 year ago

Even after relaunching the app?

helloworld1 commented 1 year ago

Yes, and actually you probably need to re-launch the app after you change the system theme.

kudlav commented 1 year ago

Then, this is not feature request, but a bug report:

  1. Turn on System dark theme
  2. Launch the app
  3. Turn off Use dark theme
  4. Relaunch the app
  5. The app is always in light theme, not reflecting system theme.

Google Pixel 7a Android 14 FreeOTP+ v3.0

helloworld1 commented 1 year ago

I see. Thanks for the steps. I reproduce it on Android 14, will take a look

helloworld1 commented 1 year ago

I have fixed the issue in this commit: https://github.com/helloworld1/FreeOTPPlus/commit/5838e60cf6a2f0a7ba75f617419ce1485c684828

The fix will be released with the next version.