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 3d82049b37a..13099cf30f5 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 @@ -321,7 +321,7 @@ class SendViewModel @Inject constructor( mutableStateFlow.update { it.copy(isRefreshing = true) } // The Pull-To-Refresh composable is already in the refreshing state. // We will reset that state when sendDataStateFlow emits later on. - vaultRepo.sync(forced = true) + vaultRepo.sync(forced = false) } } 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 cd144a49051..a1665e7ee2d 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 @@ -307,7 +307,7 @@ class VaultItemListingViewModel @Inject constructor( mutableStateFlow.update { it.copy(isRefreshing = true) } // The Pull-To-Refresh composable is already in the refreshing state. // We will reset that state when sendDataStateFlow emits later on. - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } private fun handleConfirmOverwriteExistingPasskeyClick( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt index a3ed762b4e7..7a4087dae49 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt @@ -359,7 +359,7 @@ class VaultViewModel @Inject constructor( mutableStateFlow.update { it.copy(isRefreshing = true) } // The Pull-To-Refresh composable is already in the refreshing state. // We will reset that state when sendDataStateFlow emits later on. - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } private fun handleOverflowOptionClick(action: VaultAction.OverflowOptionClick) { 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 261894f4d0b..fa43b9ba244 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 @@ -127,7 +127,7 @@ class VerificationCodeViewModel @Inject constructor( mutableStateFlow.update { it.copy(isRefreshing = true) } // The Pull-To-Refresh composable is already in the refreshing state. // We will reset that state when sendDataStateFlow emits later on. - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } private fun handleSearchIconClick() { 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 1ddbe849a7a..2365524238e 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 @@ -419,13 +419,13 @@ class SendViewModelTest : BaseViewModelTest() { @Test fun `RefreshPull should call vault repository sync`() { - every { vaultRepo.sync(forced = true) } just runs + every { vaultRepo.sync(forced = false) } just runs val viewModel = createViewModel() viewModel.trySendAction(SendAction.RefreshPull) verify(exactly = 1) { - vaultRepo.sync(forced = true) + vaultRepo.sync(forced = false) } } 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 86644e76356..9cea3cb87a6 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 @@ -135,7 +135,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() { every { vaultFilterType } returns VaultFilterType.AllVaults every { vaultDataStateFlow } returns mutableVaultDataStateFlow every { lockVault(any()) } just runs - every { sync(forced = true) } just runs + every { sync(forced = any()) } just runs coEvery { getDecryptedFido2CredentialAutofillViews(any()) } returns DecryptFido2CredentialAutofillViewResult.Error @@ -2127,7 +2127,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() { viewModel.trySendAction(VaultItemListingsAction.RefreshPull) verify(exactly = 1) { - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } } diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt index fc76e73986b..90f1db00005 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt @@ -1365,7 +1365,7 @@ class VaultViewModelTest : BaseViewModelTest() { viewModel.trySendAction(VaultAction.RefreshPull) verify(exactly = 1) { - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } } 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 ef1423a9810..0d6c118af43 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 @@ -47,7 +47,7 @@ class VerificationCodeViewModelTest : BaseViewModelTest() { private val vaultRepository: VaultRepository = mockk { every { vaultFilterType } returns VaultFilterType.AllVaults every { getAuthCodesFlow() } returns mutableAuthCodeFlow.asStateFlow() - every { sync(forced = true) } just runs + every { sync(forced = any()) } just runs } private val environmentRepository: EnvironmentRepository = mockk { @@ -456,7 +456,7 @@ class VerificationCodeViewModelTest : BaseViewModelTest() { viewModel.trySendAction(VerificationCodeAction.RefreshPull) verify(exactly = 1) { - vaultRepository.sync(forced = true) + vaultRepository.sync(forced = false) } }