-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme.getMode() returns 'ns-light' while device is in dark mode (ios and android) #232
Comments
More like an enhancement, as this functionality wasn't updated after {N} 6.2 got released. |
Same issue getting ns-light instead of ns-dark |
Same issue |
With the @next version (2.3.0+) getMode should now return Theme.Auto ("auto"), after which you can call Also @next introduces hard mode setting - setting a mode will override the system mode until you call |
I'm using 2.3.3 and this feature is not working! getMode() returns ns-light. not sure why these issues are being closed without being fixed. |
The hard mode change is not yet merged, there were some objections against it from the team. I'll re-discuss it with them tomorrow. |
Also, when the app is open and then you go to phone settings to change the system theme (the NS app goes to background) - and then re-open the NS app - the new change is not reflected. I do receive the callback in the app that a new theme has been selected - but the page is not refreshed with the new theme. Is this something I have to do - and if so how can I call it from the callback - w/ no reference to the current displayed page. Thanks. |
Can you provide a Playground demo what exactly are you doing? Thanks in advance. |
The phone is in dark mode. I open the nativescript app - and it's in dark mode. I do a theme.getMode() and it returns ns-light. That's the bug! |
Can you check if this works with the latest @next version? |
This is issue is still current on the latest version of native script (tns version 6.7.8) |
before setting the theme, ( using
.setMode(...)
or.toggleMode()
)I would expect
.getMode()
to return 'ns-dark' if the device (system appearance) was in dark mode however.getMode()
initially always returns 'ns-light'Im not totally sure if this is a bug - I'm now just using
application.systemAppearance()
instead but thought that I would post this issue just in case."nativescript-theme-core": "^2.0.24",
✔ Component nativescript has 6.2.1 version and is up to date.
✔ Component tns-core-modules has 6.2.1 version and is up to date.
✔ Component tns-android has 6.2.0 version and is up to date.
✔ Component tns-ios has 6.2.0 version and is up to date.
The text was updated successfully, but these errors were encountered: