From 6c3150edb7e671e522369ed63f16ff20a13dd5eb Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 16 May 2022 17:16:37 +0100 Subject: [PATCH] using compareTo instead of direct subtraction --- .../ftueauth/FtueMissingRegistrationStagesComparator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt index 6a6326625e..4d9fe10852 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt @@ -21,7 +21,7 @@ import org.matrix.android.sdk.api.auth.registration.Stage class FtueMissingRegistrationStagesComparator : Comparator { override fun compare(a: Stage?, b: Stage?): Int { - return (a?.toPriority() ?: 0) - (b?.toPriority() ?: 0) + return (a?.toPriority() ?: 0).compareTo(b?.toPriority() ?: 0) } private fun Stage.toPriority() = when (this) {