mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 06:45:19 +00:00
Switch to non-deprecated stdlib methods (#990)
min and max were deprecated in favor of minOrNull and maxOrNull respectively to match their names to the typical naming format used by stdlib methods with nullable return types Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
@@ -271,7 +271,7 @@ class FormField(
|
|||||||
}
|
}
|
||||||
|
|
||||||
infix fun directlyPrecedes(that: Iterable<FormField>): Boolean {
|
infix fun directlyPrecedes(that: Iterable<FormField>): Boolean {
|
||||||
val firstIndex = that.map { it.index }.min() ?: return false
|
val firstIndex = that.map { it.index }.minOrNull() ?: return false
|
||||||
return index == firstIndex - 1
|
return index == firstIndex - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ class FormField(
|
|||||||
}
|
}
|
||||||
|
|
||||||
infix fun directlyFollows(that: Iterable<FormField>): Boolean {
|
infix fun directlyFollows(that: Iterable<FormField>): Boolean {
|
||||||
val lastIndex = that.map { it.index }.max() ?: return false
|
val lastIndex = that.map { it.index }.maxOrNull() ?: return false
|
||||||
return index == lastIndex + 1
|
return index == lastIndex + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user