Stop changing settings page color, since it always has no background on restart.

Signed-off-by: Ariel Costas <arielcostas@mailbox.org>
This commit is contained in:
Ariel Costas 2022-09-03 20:58:57 +02:00
parent 11ffe839f9
commit eabfd666b6
1 changed files with 0 additions and 12 deletions

View File

@ -6,7 +6,6 @@ import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.net.Uri
import android.os.Build
import android.os.Bundle
@ -299,17 +298,6 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
true
}
// Receives the ColorSheet color code, converts to hex and if it's a color sets it for the current view
backgroundColourPreference.setOnPreferenceChangeListener { _, colour ->
val hex = ColorSheetUtils.colorToHex(colour as Int)
when (colour) {
ColorSheet.NO_COLOR -> this.view?.background = null
else -> this.view?.background = ColorDrawable(Color.parseColor("$hex"))
}
true
}
appearanceCategory.addPreference(backgroundColourPreference)
}