mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 10:01:50 +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
|
||||
).joinToString("") { it.value.toString() }
|
||||
|
||||
fun filterOf(char: Char): Filters? {
|
||||
return Filters::class.java.enumConstants?.find { it.value == char }
|
||||
}
|
||||
fun filterOf(char: Char) = values().find { it.value == char }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,9 +94,9 @@ class SettingsReaderController : SettingsController() {
|
||||
intListPreference(activity) {
|
||||
key = Keys.rotation
|
||||
titleRes = R.string.rotation
|
||||
val enumConstants = OrientationType::class.java.enumConstants
|
||||
entriesRes = enumConstants?.map { it.stringRes }.orEmpty().toTypedArray()
|
||||
entryRange = 1..(enumConstants?.size ?: 5)
|
||||
val enumConstants = OrientationType.values()
|
||||
entriesRes = enumConstants.map { it.stringRes }.toTypedArray()
|
||||
entryRange = 1..enumConstants.size
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
|
Loading…
Reference in New Issue
Block a user