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() }