Reputation: 666
I've an ionic-react native mobile app. Started showing weird behaviour.
When I'm building the apk and installing it to Android Device, it works fine for the first time. The 2nd time, it's opening with a dark theme.
If I clear this particular app's cache, it opens in light theme but 2nd time onwards again goes to dark mode.
In a few devices it works well without this inconsistency.
Any help on this is highly appreciated.
Upvotes: 1
Views: 253
Reputation: 666
I know it's not the correct solution but to solve the issue I used the following workaround.
\src\theme\variables.css
@media (prefers-color-scheme: dark) {
/* ---- Comment/ Remove Various Style Initialization --- */
}
But, if anyone finds the correct solution kindly post.
Upvotes: 1