diff --git a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt index 8424a5e915..9fd013ee79 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt @@ -42,7 +42,7 @@ import im.vector.app.features.login.ReAuthHelper import im.vector.app.features.login.ServerType import im.vector.app.features.login.SignMode import im.vector.app.features.onboarding.StartAuthenticationFlowUseCase.StartAuthenticationResult -import im.vector.app.features.onboarding.ftueauth.MatrixOrgMissingRegistrationStagesComparator +import im.vector.app.features.onboarding.ftueauth.MatrixOrgRegistrationStagesComparator import kotlinx.coroutines.Job import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.launch @@ -293,7 +293,7 @@ class OnboardingViewModel @AssistedInject constructor( withState { state -> val orderedResult = when { state.hasSelectedMatrixOrg() && vectorFeatures.isOnboardingCombinedRegisterEnabled() -> flowResult.copy( - missingStages = flowResult.missingStages.sortedWith(MatrixOrgMissingRegistrationStagesComparator()) + missingStages = flowResult.missingStages.sortedWith(MatrixOrgRegistrationStagesComparator()) ) else -> flowResult } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparator.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparator.kt similarity index 93% rename from vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparator.kt rename to vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparator.kt index 894a474a9e..fcc70803a0 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparator.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparator.kt @@ -18,7 +18,7 @@ package im.vector.app.features.onboarding.ftueauth import org.matrix.android.sdk.api.auth.registration.Stage -class MatrixOrgMissingRegistrationStagesComparator : Comparator { +class MatrixOrgRegistrationStagesComparator : Comparator { override fun compare(a: Stage?, b: Stage?): Int { return (a?.toPriority() ?: 0).compareTo(b?.toPriority() ?: 0) diff --git a/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparatorTest.kt b/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparatorTest.kt similarity index 91% rename from vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparatorTest.kt rename to vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparatorTest.kt index 1fe8ad6000..08be0ee058 100644 --- a/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgMissingRegistrationStagesComparatorTest.kt +++ b/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/MatrixOrgRegistrationStagesComparatorTest.kt @@ -25,7 +25,7 @@ import im.vector.app.test.fixtures.anOtherStage import org.amshove.kluent.shouldBeEqualTo import org.junit.Test -class MatrixOrgMissingRegistrationStagesComparatorTest { +class MatrixOrgRegistrationStagesComparatorTest { @Test fun `when ordering stages, then prioritizes email`() { @@ -38,7 +38,7 @@ class MatrixOrgMissingRegistrationStagesComparatorTest { aTermsStage() ) - val result = input.sortedWith(MatrixOrgMissingRegistrationStagesComparator()) + val result = input.sortedWith(MatrixOrgRegistrationStagesComparator()) result shouldBeEqualTo listOf( anEmailStage(),