nowinandroid
nowinandroid copied to clipboard
Update SettingsViewModel.kt
What I have done and why
- Used setApplicationNightMode via UiModeManager for API 31+ (Android 12+).
- Used AppCompatDelegate.setDefaultNightMode for below API 31.
- Ensures consistent dark theme behaviour across all Android versions.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Please read the instructions for submitting a pull request.
@dturner I've read all the instructions now — since this is my first PR, I initially missed them. I've updated the comment accordingly. Let me know if any further changes are needed.
@yannigoyal Thanks for updating this PR. You'll need to sign the CLA before we can accept it.