mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
remove java.enumConstants where unneeded
This commit is contained in:
parent
4fa4953a7e
commit
20f8fac479
@ -522,9 +522,7 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
|
|||||||
Tracked
|
Tracked
|
||||||
).joinToString("") { it.value.toString() }
|
).joinToString("") { it.value.toString() }
|
||||||
|
|
||||||
fun filterOf(char: Char): Filters? {
|
fun filterOf(char: Char) = values().find { it.value == char }
|
||||||
return Filters::class.java.enumConstants?.find { it.value == char }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,9 +94,9 @@ class SettingsReaderController : SettingsController() {
|
|||||||
intListPreference(activity) {
|
intListPreference(activity) {
|
||||||
key = Keys.rotation
|
key = Keys.rotation
|
||||||
titleRes = R.string.rotation
|
titleRes = R.string.rotation
|
||||||
val enumConstants = OrientationType::class.java.enumConstants
|
val enumConstants = OrientationType.values()
|
||||||
entriesRes = enumConstants?.map { it.stringRes }.orEmpty().toTypedArray()
|
entriesRes = enumConstants.map { it.stringRes }.toTypedArray()
|
||||||
entryRange = 1..(enumConstants?.size ?: 5)
|
entryRange = 1..enumConstants.size
|
||||||
defaultValue = 1
|
defaultValue = 1
|
||||||
}
|
}
|
||||||
intListPreference(activity) {
|
intListPreference(activity) {
|
||||||
|
Loading…
Reference in New Issue
Block a user