mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
making comparator override non null as kotlin guards against this
This commit is contained in:
parent
1ec99ee89e
commit
5f2cb671e2
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue