NativeScript / theme

@nativescript/theme
https://v7.docs.nativescript.org/ui/theme
Apache License 2.0
127 stars 44 forks source link

Theme bug on IOS #299

Open gustavost26 opened 2 years ago

gustavost26 commented 2 years ago

Good afternoon folks.

Environment

Tested on both versions:

NativeScript Global Version: 8.1.5

"@nativescript/core": "~8.1.0" "@nativescript/android": "8.1.0", "@nativescript/ios": "~8.1.0",

and

Current global version: 8.2.3

"@nativescript/core": "~8.2.0", "@nativescript/android": "8.2.0", "@nativescript/ios": "~8.2.0",

Theme plugin:

"@nativescript/theme": "~3.0.0"

Describe the bug

With the dark theme activated, it ends up getting lost when exiting and returning to the application, follow the video link to show how it works:

https://youtube.com/shorts/boyHN839QFs

With the option (system) selected by default or by the user, the theme is not lost when leaving and returning to the application, youtube link for demonstration:

https://youtube.com/shorts/rr6613_ky6k

This bug only occurs on IOS, on android everything works perfectly.

Additional context

In the application state, the selected dark theme is saved.

Apparently the project code is all right. The dark variable is being called from localstorage but not applied by the theme plugin.

When you leave and enter the application, the variable 'dark' is set but the light theme is applied.