mirror of
https://github.com/bitwarden/android.git
synced 2024-11-24 18:36:32 +03:00
Update no network errors to be consistent and have a space inbetween concatenated text (#3446)
This commit is contained in:
parent
f6f28f6a58
commit
c409132825
18 changed files with 77 additions and 21 deletions
|
@ -610,7 +610,10 @@ class SearchViewModel @Inject constructor(
|
||||||
viewState = SearchState.ViewState.Error(
|
viewState = SearchState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
)
|
)
|
||||||
|
|
|
@ -97,7 +97,10 @@ class FoldersViewModel @Inject constructor(
|
||||||
viewState = FoldersState.ViewState.Error(
|
viewState = FoldersState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,10 @@ class FolderAddEditViewModel @Inject constructor(
|
||||||
viewState = FolderAddEditState.ViewState.Error(
|
viewState = FolderAddEditState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,7 @@ class SendViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("LongMethod")
|
||||||
private fun handleSendDataReceive(action: SendAction.Internal.SendDataReceive) {
|
private fun handleSendDataReceive(action: SendAction.Internal.SendDataReceive) {
|
||||||
when (val dataState = action.sendDataState) {
|
when (val dataState = action.sendDataState) {
|
||||||
is DataState.Error -> {
|
is DataState.Error -> {
|
||||||
|
@ -205,7 +206,10 @@ class SendViewModel @Inject constructor(
|
||||||
viewState = SendState.ViewState.Error(
|
viewState = SendState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
)
|
)
|
||||||
|
|
|
@ -343,7 +343,10 @@ class AddSendViewModel @Inject constructor(
|
||||||
viewState = AddSendState.ViewState.Error(
|
viewState = AddSendState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1236,7 +1236,10 @@ class VaultAddEditViewModel @Inject constructor(
|
||||||
viewState = VaultAddEditState.ViewState.Error(
|
viewState = VaultAddEditState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,8 +239,10 @@ class AttachmentsViewModel @Inject constructor(
|
||||||
viewState = AttachmentsState.ViewState.Error(
|
viewState = AttachmentsState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat("\n".asText())
|
.concat(
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,7 +735,10 @@ class VaultItemListingViewModel @Inject constructor(
|
||||||
viewState = VaultItemListingState.ViewState.Error(
|
viewState = VaultItemListingState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
)
|
)
|
||||||
|
|
|
@ -221,7 +221,10 @@ class VaultMoveToOrganizationViewModel @Inject constructor(
|
||||||
dialogState = VaultMoveToOrganizationState.DialogState.Error(
|
dialogState = VaultMoveToOrganizationState.DialogState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -229,7 +232,10 @@ class VaultMoveToOrganizationViewModel @Inject constructor(
|
||||||
viewState = VaultMoveToOrganizationState.ViewState.Error(
|
viewState = VaultMoveToOrganizationState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
)
|
)
|
||||||
|
|
|
@ -219,7 +219,10 @@ class VerificationCodeViewModel @Inject constructor(
|
||||||
viewState = VerificationCodeState.ViewState.Error(
|
viewState = VerificationCodeState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1154,7 +1154,10 @@ class SearchViewModelTest : BaseViewModelTest() {
|
||||||
viewState = SearchState.ViewState.Error(
|
viewState = SearchState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
|
@ -129,7 +129,10 @@ class FoldersViewModelTest : BaseViewModelTest() {
|
||||||
viewState = FoldersState.ViewState.Error(
|
viewState = FoldersState.ViewState.Error(
|
||||||
R.string.internet_connection_required_title
|
R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
|
@ -572,7 +572,10 @@ class FolderAddEditViewModelTest : BaseViewModelTest() {
|
||||||
viewState = FolderAddEditState.ViewState.Error(
|
viewState = FolderAddEditState.ViewState.Error(
|
||||||
R.string.internet_connection_required_title
|
R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
|
@ -389,7 +389,10 @@ class SendViewModelTest : BaseViewModelTest() {
|
||||||
viewState = SendState.ViewState.Error(
|
viewState = SendState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
dialogState = null,
|
dialogState = null,
|
||||||
),
|
),
|
||||||
|
|
|
@ -480,8 +480,10 @@ class AttachmentsViewModelTest : BaseViewModelTest() {
|
||||||
viewState = AttachmentsState.ViewState.Error(
|
viewState = AttachmentsState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat("\n".asText())
|
.concat(
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
|
@ -1333,7 +1333,10 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
|
||||||
viewState = VaultItemListingState.ViewState.Error(
|
viewState = VaultItemListingState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
|
@ -224,7 +224,10 @@ class VaultMoveToOrganizationViewModelTest : BaseViewModelTest() {
|
||||||
viewState = VaultMoveToOrganizationState.ViewState.Error(
|
viewState = VaultMoveToOrganizationState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
awaitItem(),
|
awaitItem(),
|
||||||
|
|
|
@ -325,7 +325,10 @@ class VerificationCodeViewModelTest : BaseViewModelTest() {
|
||||||
viewState = VerificationCodeState.ViewState.Error(
|
viewState = VerificationCodeState.ViewState.Error(
|
||||||
message = R.string.internet_connection_required_title
|
message = R.string.internet_connection_required_title
|
||||||
.asText()
|
.asText()
|
||||||
.concat(R.string.internet_connection_required_message.asText()),
|
.concat(
|
||||||
|
" ".asText(),
|
||||||
|
R.string.internet_connection_required_message.asText(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
viewModel.stateFlow.value,
|
viewModel.stateFlow.value,
|
||||||
|
|
Loading…
Reference in a new issue