quran / quran.com-frontend-v2

https://previous.quran.com
GNU General Public License v3.0
456 stars 199 forks source link

Dark/light mode preferences are not persisted #226

Closed osamasayed closed 4 years ago

osamasayed commented 4 years ago

Steps

  1. Go to https://quran.com/ which will load the dark mode by default
  2. click on the light mode icon
  3. the mode changes from dark to light.
  4. refresh the page

Expected

Actual

Environment

[This also happens without having to refresh the page. You just go to the homepage and choose the light mode then click on a Surah and it will revert to the default dark mode]

naveed-ahmad commented 4 years ago

theme setting is persisted, can you confirm if you've set the dark theme for your mac?

osamasayed commented 4 years ago

Yes, I have set the dark theme for my mac and I see that the nightMode value changes in the local storage every time I click on the mode switcher icon.

Screen Shot 2020-10-16 at 09 48 00

However, I think even if I set the dark mode on my mac and choose to have the light mode on the website, it should over-ride my mac's choice.