OLED fix
This commit is contained in:
parent
c2a07278fc
commit
f01377f0b1
1 changed files with 4 additions and 5 deletions
|
@ -29,11 +29,11 @@ class ThemeManager(private val context: Context) {
|
||||||
val useSource = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_source_theme", false)
|
val useSource = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_source_theme", false)
|
||||||
val useMaterial = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_material_you", false)
|
val useMaterial = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_material_you", false)
|
||||||
if(useSource){
|
if(useSource){
|
||||||
applyDynamicColors(useMaterial, context, useOLED, fromImage, useCustom = if(useCustomTheme) customTheme else null)
|
val returnedEarly = applyDynamicColors(useMaterial, context, useOLED, fromImage, useCustom = if(useCustomTheme) customTheme else null)
|
||||||
return
|
if(!returnedEarly) return
|
||||||
} else if (useCustomTheme) {
|
} else if (useCustomTheme) {
|
||||||
applyDynamicColors(useMaterial, context, useOLED, useCustom = customTheme)
|
val returnedEarly = applyDynamicColors(useMaterial, context, useOLED, useCustom = customTheme)
|
||||||
return
|
if(!returnedEarly) return
|
||||||
} else {
|
} else {
|
||||||
val returnedEarly = applyDynamicColors(useMaterial, context, useOLED, useCustom = null)
|
val returnedEarly = applyDynamicColors(useMaterial, context, useOLED, useCustom = null)
|
||||||
if(!returnedEarly) return
|
if(!returnedEarly) return
|
||||||
|
@ -71,7 +71,6 @@ class ThemeManager(private val context: Context) {
|
||||||
// Set the theme overlay based on conditions
|
// Set the theme overlay based on conditions
|
||||||
if (useOLED) {
|
if (useOLED) {
|
||||||
builder.setThemeOverlay(R.style.AppTheme_Amoled)
|
builder.setThemeOverlay(R.style.AppTheme_Amoled)
|
||||||
needMaterial = false
|
|
||||||
}
|
}
|
||||||
if(needMaterial && !useMaterialYou) return true
|
if(needMaterial && !useMaterialYou) return true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue