From c40913282539b936221dd1ad8fafe3e8f0ac88c6 Mon Sep 17 00:00:00 2001 From: David Perez Date: Thu, 11 Jul 2024 15:00:30 -0500 Subject: [PATCH] Update no network errors to be consistent and have a space inbetween concatenated text (#3446) --- .../ui/platform/feature/search/SearchViewModel.kt | 5 ++++- .../feature/settings/folders/FoldersViewModel.kt | 5 ++++- .../settings/folders/addedit/FolderAddEditViewModel.kt | 5 ++++- .../bitwarden/ui/tools/feature/send/SendViewModel.kt | 6 +++++- .../ui/tools/feature/send/addsend/AddSendViewModel.kt | 5 ++++- .../ui/vault/feature/addedit/VaultAddEditViewModel.kt | 5 ++++- .../vault/feature/attachments/AttachmentsViewModel.kt | 6 ++++-- .../feature/itemlisting/VaultItemListingViewModel.kt | 5 ++++- .../VaultMoveToOrganizationViewModel.kt | 10 ++++++++-- .../verificationcode/VerificationCodeViewModel.kt | 5 ++++- .../ui/platform/feature/search/SearchViewModelTest.kt | 5 ++++- .../feature/settings/folders/FoldersViewModelTest.kt | 5 ++++- .../folders/addedit/FolderAddEditViewModelTest.kt | 5 ++++- .../ui/tools/feature/send/SendViewModelTest.kt | 5 ++++- .../feature/attachments/AttachmentsViewModelTest.kt | 6 ++++-- .../itemlisting/VaultItemListingViewModelTest.kt | 5 ++++- .../VaultMoveToOrganizationViewModelTest.kt | 5 ++++- .../verificationcode/VerificationCodeViewModelTest.kt | 5 ++++- 18 files changed, 77 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModel.kt index ffeb0a401..89331c20a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModel.kt @@ -610,7 +610,10 @@ class SearchViewModel @Inject constructor( viewState = SearchState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModel.kt index 9db3b238b..dcddd0c3f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModel.kt @@ -97,7 +97,10 @@ class FoldersViewModel @Inject constructor( viewState = FoldersState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModel.kt index f0e9cf4ce..06ad1ddf4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModel.kt @@ -208,7 +208,10 @@ class FolderAddEditViewModel @Inject constructor( viewState = FolderAddEditState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt index b3adf4ae6..cae801d9f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt @@ -164,6 +164,7 @@ class SendViewModel @Inject constructor( } } + @Suppress("LongMethod") private fun handleSendDataReceive(action: SendAction.Internal.SendDataReceive) { when (val dataState = action.sendDataState) { is DataState.Error -> { @@ -205,7 +206,10 @@ class SendViewModel @Inject constructor( viewState = SendState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendViewModel.kt index 2132522e4..fae0eac0c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendViewModel.kt @@ -343,7 +343,10 @@ class AddSendViewModel @Inject constructor( viewState = AddSendState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt index d3e66cd8d..aaf341cbb 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt @@ -1236,7 +1236,10 @@ class VaultAddEditViewModel @Inject constructor( viewState = VaultAddEditState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt index 9d1456f71..1abb8d5ac 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModel.kt @@ -239,8 +239,10 @@ class AttachmentsViewModel @Inject constructor( viewState = AttachmentsState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat("\n".asText()) - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt index 1fc448563..f891159ba 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt @@ -735,7 +735,10 @@ class VaultItemListingViewModel @Inject constructor( viewState = VaultItemListingState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt index eee59f1fd..e0dab914c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt @@ -221,7 +221,10 @@ class VaultMoveToOrganizationViewModel @Inject constructor( dialogState = VaultMoveToOrganizationState.DialogState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ) } else { @@ -229,7 +232,10 @@ class VaultMoveToOrganizationViewModel @Inject constructor( viewState = VaultMoveToOrganizationState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModel.kt index 3bd87f8e4..d29e564e3 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModel.kt @@ -219,7 +219,10 @@ class VerificationCodeViewModel @Inject constructor( viewState = VerificationCodeState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ) diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt index 4ebdce278..9e18868be 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchViewModelTest.kt @@ -1154,7 +1154,10 @@ class SearchViewModelTest : BaseViewModelTest() { viewState = SearchState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value, diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModelTest.kt index b8df77c2b..5b3f93d87 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersViewModelTest.kt @@ -129,7 +129,10 @@ class FoldersViewModelTest : BaseViewModelTest() { viewState = FoldersState.ViewState.Error( R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value, diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModelTest.kt index d32fc9af1..cb515a1bf 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/addedit/FolderAddEditViewModelTest.kt @@ -572,7 +572,10 @@ class FolderAddEditViewModelTest : BaseViewModelTest() { viewState = FolderAddEditState.ViewState.Error( R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value, diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModelTest.kt index 8f0208a3c..25a46f3d4 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModelTest.kt @@ -389,7 +389,10 @@ class SendViewModelTest : BaseViewModelTest() { viewState = SendState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), dialogState = null, ), diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt index cfbcaa76d..1b85d5848 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt @@ -480,8 +480,10 @@ class AttachmentsViewModelTest : BaseViewModelTest() { viewState = AttachmentsState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat("\n".asText()) - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value, diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt index 9dd1c21c1..7964bfa4d 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt @@ -1333,7 +1333,10 @@ class VaultItemListingViewModelTest : BaseViewModelTest() { viewState = VaultItemListingState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value, diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt index 5597aa454..d103e7cb5 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt @@ -224,7 +224,10 @@ class VaultMoveToOrganizationViewModelTest : BaseViewModelTest() { viewState = VaultMoveToOrganizationState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), awaitItem(), diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModelTest.kt index a35cffced..42b215146 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeViewModelTest.kt @@ -325,7 +325,10 @@ class VerificationCodeViewModelTest : BaseViewModelTest() { viewState = VerificationCodeState.ViewState.Error( message = R.string.internet_connection_required_title .asText() - .concat(R.string.internet_connection_required_message.asText()), + .concat( + " ".asText(), + R.string.internet_connection_required_message.asText(), + ), ), ), viewModel.stateFlow.value,