making comparator override non null as kotlin guards against this
This commit is contained in:
parent
1ec99ee89e
commit
5f2cb671e2
|
@ -20,8 +20,8 @@ import org.matrix.android.sdk.api.auth.registration.Stage
|
|||
|
||||
class MatrixOrgRegistrationStagesComparator : Comparator<Stage> {
|
||||
|
||||
override fun compare(a: Stage?, b: Stage?): Int {
|
||||
return (a?.toPriority() ?: 0).compareTo(b?.toPriority() ?: 0)
|
||||
override fun compare(a: Stage, b: Stage): Int {
|
||||
return a.toPriority().compareTo(b.toPriority())
|
||||
}
|
||||
|
||||
private fun Stage.toPriority() = when (this) {
|
||||
|
|
Loading…
Reference in New Issue