Fix some warnings & recreate lint-baseline.xml (#4278)

This commit is contained in:
Konrad Pozniak 2024-02-25 16:20:26 +01:00 committed by GitHub
commit 6249b53718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 119 additions and 75 deletions

View file

@ -21,7 +21,7 @@ data class Filter(
HIDE("hide");
companion object {
fun from(action: String): Action = values().firstOrNull { it.action == action } ?: WARN
fun from(action: String): Action = entries.firstOrNull { it.action == action } ?: WARN
}
}
enum class Kind(val kind: String) {
@ -32,7 +32,7 @@ data class Filter(
ACCOUNT("account");
companion object {
fun from(kind: String): Kind = values().firstOrNull { it.kind == kind } ?: PUBLIC
fun from(kind: String): Kind = entries.firstOrNull { it.kind == kind } ?: PUBLIC
}
}

View file

@ -35,7 +35,7 @@ data class MastoList(
companion object {
fun from(policy: String?): ReplyPolicy =
values().firstOrNull { it.policy == policy } ?: LIST
entries.firstOrNull { it.policy == policy } ?: LIST
}
}
}

View file

@ -69,7 +69,7 @@ data class Notification(
companion object {
@JvmStatic
fun byString(s: String): Type {
values().forEach {
entries.forEach {
if (s == it.presentation) {
return it
}