From dc4a9cadc9efe06e166b47a8dfe513d5dacf5993 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 31 Jul 2020 13:06:54 +0530 Subject: 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 --- app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt index 2bfa5075..6435a83f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt @@ -271,7 +271,7 @@ class FormField( } infix fun directlyPrecedes(that: Iterable): Boolean { - val firstIndex = that.map { it.index }.min() ?: return false + val firstIndex = that.map { it.index }.minOrNull() ?: return false return index == firstIndex - 1 } @@ -280,7 +280,7 @@ class FormField( } infix fun directlyFollows(that: Iterable): Boolean { - val lastIndex = that.map { it.index }.max() ?: return false + val lastIndex = that.map { it.index }.maxOrNull() ?: return false return index == lastIndex + 1 } -- cgit v1.2.3