mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
using compareTo instead of direct subtraction
This commit is contained in:
parent
a893f5acdb
commit
6c3150edb7
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ import org.matrix.android.sdk.api.auth.registration.Stage
|
|||
class FtueMissingRegistrationStagesComparator : Comparator<Stage> {
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue