From 922f65cc9664e7e527a16e36ebea83e37efc501f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 10 Jul 2024 16:27:29 +0200 Subject: [PATCH] Some renaming. --- .../features/lockscreen/impl/setup/pin/SetupPinPresenter.kt | 4 ++-- .../lockscreen/impl/setup/pin/SetupPinStateProvider.kt | 2 +- .../features/lockscreen/impl/setup/pin/SetupPinView.kt | 4 ++-- .../lockscreen/impl/setup/pin/validation/SetupPinFailure.kt | 2 +- .../lockscreen/impl/setup/pin/SetupPinPresenterTest.kt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt index 2f1fdadc22..eec7e6a19b 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenter.kt @@ -76,7 +76,7 @@ class SetupPinPresenter @Inject constructor( if (confirmPinEntry == choosePinEntry) { pinCodeManager.createPinCode(confirmPinEntry.toText()) } else { - setupPinFailure = SetupPinFailure.PinsDontMatch + setupPinFailure = SetupPinFailure.PinsDoNotMatch } } } @@ -93,7 +93,7 @@ class SetupPinPresenter @Inject constructor( } SetupPinEvents.ClearFailure -> { when (setupPinFailure) { - is SetupPinFailure.PinsDontMatch -> { + is SetupPinFailure.PinsDoNotMatch -> { choosePinEntry = choosePinEntry.clear() confirmPinEntry = confirmPinEntry.clear() } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt index 1e8274b1b8..f8d35ec630 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt @@ -35,7 +35,7 @@ open class SetupPinStateProvider : PreviewParameterProvider { choosePinEntry = PinEntry.createEmpty(4).fillWith("1789"), confirmPinEntry = PinEntry.createEmpty(4).fillWith("1788"), isConfirmationStep = true, - creationFailure = SetupPinFailure.PinsDontMatch + creationFailure = SetupPinFailure.PinsDoNotMatch ), aSetupPinState( choosePinEntry = PinEntry.createEmpty(4).fillWith("1111"), diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinView.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinView.kt index 61d89bf3fd..ad0b375812 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinView.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinView.kt @@ -136,7 +136,7 @@ private fun SetupPinContent( private fun SetupPinFailure.content(): String { return when (this) { SetupPinFailure.ForbiddenPin -> stringResource(id = R.string.screen_app_lock_setup_pin_forbidden_dialog_content) - SetupPinFailure.PinsDontMatch -> stringResource(id = R.string.screen_app_lock_setup_pin_mismatch_dialog_content) + SetupPinFailure.PinsDoNotMatch -> stringResource(id = R.string.screen_app_lock_setup_pin_mismatch_dialog_content) } } @@ -144,7 +144,7 @@ private fun SetupPinFailure.content(): String { private fun SetupPinFailure.title(): String { return when (this) { SetupPinFailure.ForbiddenPin -> stringResource(id = R.string.screen_app_lock_setup_pin_forbidden_dialog_title) - SetupPinFailure.PinsDontMatch -> stringResource(id = R.string.screen_app_lock_setup_pin_mismatch_dialog_title) + SetupPinFailure.PinsDoNotMatch -> stringResource(id = R.string.screen_app_lock_setup_pin_mismatch_dialog_title) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/validation/SetupPinFailure.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/validation/SetupPinFailure.kt index 873220eef7..66f3cd0731 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/validation/SetupPinFailure.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/validation/SetupPinFailure.kt @@ -18,5 +18,5 @@ package io.element.android.features.lockscreen.impl.setup.pin.validation sealed interface SetupPinFailure { data object ForbiddenPin : SetupPinFailure - data object PinsDontMatch : SetupPinFailure + data object PinsDoNotMatch : SetupPinFailure } diff --git a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt index ecbeffc35c..3261aa9e71 100644 --- a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt +++ b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt @@ -89,7 +89,7 @@ class SetupPinPresenterTest { awaitLastSequentialItem().also { state -> state.choosePinEntry.assertText(completePin) state.confirmPinEntry.assertText(mismatchedPin) - assertThat(state.setupPinFailure).isEqualTo(SetupPinFailure.PinsDontMatch) + assertThat(state.setupPinFailure).isEqualTo(SetupPinFailure.PinsDoNotMatch) state.eventSink(SetupPinEvents.ClearFailure) } awaitLastSequentialItem().also { state ->