You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Added more standard night-mode system
This commit is contained in:
@@ -39,10 +39,13 @@ abstract class BaseActivity<ViewModel : BaseViewModel, Binding : ViewDataBinding
|
||||
private val resultCallbacks by lazy { SparseArrayCompat<RequestCallback>() }
|
||||
|
||||
init {
|
||||
val theme = if (Config.darkTheme) {
|
||||
AppCompatDelegate.MODE_NIGHT_YES
|
||||
val theme = if (Config.redesign) {
|
||||
Config.darkThemeExtended
|
||||
} else {
|
||||
AppCompatDelegate.MODE_NIGHT_NO
|
||||
when {
|
||||
Config.darkTheme -> AppCompatDelegate.MODE_NIGHT_YES
|
||||
else -> AppCompatDelegate.MODE_NIGHT_NO
|
||||
}
|
||||
}
|
||||
AppCompatDelegate.setDefaultNightMode(theme)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user