From c8748f4d773c8fb149d7316b0915df63381d9ae0 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 23 Sep 2026 11:51:54 +0200 Subject: [PATCH] `nbOfBlockedUsers` -> `numberOfBlockedUsers` --- .../impl/account/PreferencesAccountPresenter.kt | 4 ++-- .../preferences/impl/account/PreferencesAccountState.kt | 4 ++-- .../impl/account/PreferencesAccountStatePreviewParam.kt | 8 ++++---- .../preferences/impl/account/PreferencesAccountView.kt | 2 +- .../impl/account/PreferencesAccountPresenterTest.kt | 4 ++-- .../impl/account/PreferencesAccountViewTest.kt | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountPresenter.kt index e4c84538ce..a51e86647c 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountPresenter.kt @@ -73,7 +73,7 @@ class PreferencesAccountPresenter( canDeactivateAccount = matrixClient.canDeactivateAccount() } - val nbOfBlockedUsers by produceState(initialValue = 0) { + val numberOfBlockedUsers by produceState(initialValue = 0) { matrixClient.ignoredUsersFlow .onEach { value = it.size } .launchIn(this) @@ -93,7 +93,7 @@ class PreferencesAccountPresenter( canReportBug = canReportBug, showLinkNewDevice = showLinkNewDevice, canDeactivateAccount = canDeactivateAccount, - nbOfBlockedUsers = nbOfBlockedUsers, + numberOfBlockedUsers = numberOfBlockedUsers, directLogoutState = directLogoutState, snackbarMessage = snackbarMessage, ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountState.kt index a3f8dd3dc2..d462d22e40 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountState.kt @@ -19,9 +19,9 @@ data class PreferencesAccountState( val canReportBug: Boolean, val showLinkNewDevice: Boolean, val canDeactivateAccount: Boolean, - val nbOfBlockedUsers: Int, + val numberOfBlockedUsers: Int, val directLogoutState: DirectLogoutState, val snackbarMessage: SnackbarMessage?, ) { - val showBlockedUsersItem = nbOfBlockedUsers > 0 + val showBlockedUsersItem = numberOfBlockedUsers > 0 } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountStatePreviewParam.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountStatePreviewParam.kt index 251e2dc22f..fe26cf7e76 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountStatePreviewParam.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/account/PreferencesAccountStatePreviewParam.kt @@ -26,7 +26,7 @@ open class PreferencesAccountStatePreviewParam : PreviewParameterProvider setView( - aPreferencesAccountState(nbOfBlockedUsers = 1), + aPreferencesAccountState(numberOfBlockedUsers = 1), onOpenBlockedUsers = callback, ) clickOn(CommonStrings.common_blocked_users) @@ -115,8 +115,8 @@ class PreferencesAccountViewTest : RobolectricTest() { } @Test - fun `when nbOfBlockedUsers is 0, item is not shown`() = runAndroidComposeUiTest { - setView(aPreferencesAccountState(nbOfBlockedUsers = 0)) + fun `when numberOfBlockedUsers is 0, item is not shown`() = runAndroidComposeUiTest { + setView(aPreferencesAccountState(numberOfBlockedUsers = 0)) onNodeWithText(activity!!.getString(CommonStrings.common_blocked_users)).assertDoesNotExist() }