Remove unsued shouldFinishOnComplete property (#3865)

This commit is contained in:
David Perez 2024-09-04 17:50:31 -05:00 committed by GitHub
parent c02afb6714
commit f10a2b15ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 21 deletions

View file

@ -109,11 +109,6 @@ class VaultItemListingViewModel @Inject constructor(
val fido2AssertionData = specialCircumstance as? SpecialCircumstance.Fido2Assertion
val fido2GetCredentialsData =
specialCircumstance as? SpecialCircumstance.Fido2GetCredentials
val shouldFinishOnComplete = autofillSelectionData
?.shouldFinishWhenComplete
?: (fido2CreationData != null ||
fido2AssertionData != null ||
fido2GetCredentialsData != null)
val dialogState = fido2CreationData
?.let { VaultItemListingState.DialogState.Loading(R.string.loading.asText()) }
VaultItemListingState(
@ -133,7 +128,6 @@ class VaultItemListingViewModel @Inject constructor(
.getActivePolicies(type = PolicyTypeJson.DISABLE_SEND)
.any(),
autofillSelectionData = autofillSelectionData?.autofillSelectionData,
shouldFinishOnComplete = shouldFinishOnComplete,
hasMasterPassword = userState.activeAccount.hasMasterPassword,
fido2CredentialRequest = fido2CreationData?.fido2CredentialRequest,
fido2CredentialAssertionRequest = fido2AssertionData?.fido2AssertionRequest,
@ -1644,7 +1638,6 @@ data class VaultItemListingState(
val fido2CredentialRequest: Fido2CredentialRequest? = null,
val fido2CredentialAssertionRequest: Fido2CredentialAssertionRequest? = null,
val fido2GetCredentialsRequest: Fido2GetCredentialsRequest? = null,
val shouldFinishOnComplete: Boolean = false,
val hasMasterPassword: Boolean,
val isPremium: Boolean,
) {

View file

@ -206,7 +206,6 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
dialogState = VaultItemListingState.DialogState.Loading(
message = R.string.loading.asText(),
),
shouldFinishOnComplete = true,
),
awaitItem(),
)
@ -1295,10 +1294,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
displayFolderList = emptyList(),
),
)
.copy(
autofillSelectionData = autofillSelectionData,
shouldFinishOnComplete = true,
),
.copy(autofillSelectionData = autofillSelectionData),
viewModel.stateFlow.value,
)
coVerify {
@ -1378,10 +1374,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
displayFolderList = emptyList(),
),
)
.copy(
fido2CredentialRequest = fido2CredentialRequest,
shouldFinishOnComplete = true,
),
.copy(fido2CredentialRequest = fido2CredentialRequest),
viewModel.stateFlow.value,
)
coVerify {
@ -1460,10 +1453,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
displayFolderList = emptyList(),
),
)
.copy(
fido2GetCredentialsRequest = fido2GetCredentialRequest,
shouldFinishOnComplete = true,
),
.copy(fido2GetCredentialsRequest = fido2GetCredentialRequest),
viewModel.stateFlow.value,
)
coVerify {
@ -3769,7 +3759,6 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
isPullToRefreshSettingEnabled = false,
dialogState = null,
autofillSelectionData = null,
shouldFinishOnComplete = false,
policyDisablesSend = false,
hasMasterPassword = true,
fido2CredentialRequest = null,