mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Rename function
This commit is contained in:
parent
1328986cfe
commit
1bff9c4545
1 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ class SettingsUI : PreferenceFragmentCompat() {
|
||||||
getPref(R.string.app_theme_key)?.setOnPreferenceClickListener {
|
getPref(R.string.app_theme_key)?.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.themes_names).toMutableList()
|
val prefNames = resources.getStringArray(R.array.themes_names).toMutableList()
|
||||||
val prefValues = resources.getStringArray(R.array.themes_names_values).toMutableList()
|
val prefValues = resources.getStringArray(R.array.themes_names_values).toMutableList()
|
||||||
val removeFunction = { text: String ->
|
val removeIncompatible = { text: String ->
|
||||||
val toRemove = prefValues
|
val toRemove = prefValues
|
||||||
.mapIndexed { idx, s -> if (s.startsWith(text)) idx else null }
|
.mapIndexed { idx, s -> if (s.startsWith(text)) idx else null }
|
||||||
.filterNotNull()
|
.filterNotNull()
|
||||||
|
@ -100,10 +100,10 @@ class SettingsUI : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { // remove monet on android 11 and less
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { // remove monet on android 11 and less
|
||||||
removeFunction("Monet")
|
removeIncompatible("Monet")
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { // Remove system on android 9 and less
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { // Remove system on android 9 and less
|
||||||
removeFunction("System")
|
removeIncompatible("System")
|
||||||
}
|
}
|
||||||
|
|
||||||
val currentLayout =
|
val currentLayout =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue