Update no network errors to be consistent and have a space inbetween concatenated text (#3446)

This commit is contained in:
David Perez 2024-07-11 15:00:30 -05:00 committed by GitHub
parent f6f28f6a58
commit c409132825
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 77 additions and 21 deletions

View file

@ -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,
)

View file

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

View file

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

View file

@ -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,
)

View file

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

View file

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

View file

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

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,
)

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,
),

View file

@ -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,

View file

@ -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,

View file

@ -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(),

View file

@ -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,