File tree Expand file tree Collapse file tree 8 files changed +11
-11
lines changed
main/java/com/x8bit/bitwarden/ui
test/java/com/x8bit/bitwarden/ui Expand file tree Collapse file tree 8 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ class SendViewModel @Inject constructor(
321
321
mutableStateFlow.update { it.copy(isRefreshing = true ) }
322
322
// The Pull-To-Refresh composable is already in the refreshing state.
323
323
// We will reset that state when sendDataStateFlow emits later on.
324
- vaultRepo.sync(forced = true )
324
+ vaultRepo.sync(forced = false )
325
325
}
326
326
}
327
327
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ class VaultItemListingViewModel @Inject constructor(
307
307
mutableStateFlow.update { it.copy(isRefreshing = true ) }
308
308
// The Pull-To-Refresh composable is already in the refreshing state.
309
309
// We will reset that state when sendDataStateFlow emits later on.
310
- vaultRepository.sync(forced = true )
310
+ vaultRepository.sync(forced = false )
311
311
}
312
312
313
313
private fun handleConfirmOverwriteExistingPasskeyClick (
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ class VaultViewModel @Inject constructor(
359
359
mutableStateFlow.update { it.copy(isRefreshing = true ) }
360
360
// The Pull-To-Refresh composable is already in the refreshing state.
361
361
// We will reset that state when sendDataStateFlow emits later on.
362
- vaultRepository.sync(forced = true )
362
+ vaultRepository.sync(forced = false )
363
363
}
364
364
365
365
private fun handleOverflowOptionClick (action : VaultAction .OverflowOptionClick ) {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class VerificationCodeViewModel @Inject constructor(
127
127
mutableStateFlow.update { it.copy(isRefreshing = true ) }
128
128
// The Pull-To-Refresh composable is already in the refreshing state.
129
129
// We will reset that state when sendDataStateFlow emits later on.
130
- vaultRepository.sync(forced = true )
130
+ vaultRepository.sync(forced = false )
131
131
}
132
132
133
133
private fun handleSearchIconClick () {
Original file line number Diff line number Diff line change @@ -419,13 +419,13 @@ class SendViewModelTest : BaseViewModelTest() {
419
419
420
420
@Test
421
421
fun `RefreshPull should call vault repository sync` () {
422
- every { vaultRepo.sync(forced = true ) } just runs
422
+ every { vaultRepo.sync(forced = false ) } just runs
423
423
val viewModel = createViewModel()
424
424
425
425
viewModel.trySendAction(SendAction .RefreshPull )
426
426
427
427
verify(exactly = 1 ) {
428
- vaultRepo.sync(forced = true )
428
+ vaultRepo.sync(forced = false )
429
429
}
430
430
}
431
431
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
135
135
every { vaultFilterType } returns VaultFilterType .AllVaults
136
136
every { vaultDataStateFlow } returns mutableVaultDataStateFlow
137
137
every { lockVault(any()) } just runs
138
- every { sync(forced = true ) } just runs
138
+ every { sync(forced = any() ) } just runs
139
139
coEvery {
140
140
getDecryptedFido2CredentialAutofillViews(any())
141
141
} returns DecryptFido2CredentialAutofillViewResult .Error
@@ -2127,7 +2127,7 @@ class VaultItemListingViewModelTest : BaseViewModelTest() {
2127
2127
viewModel.trySendAction(VaultItemListingsAction .RefreshPull )
2128
2128
2129
2129
verify(exactly = 1 ) {
2130
- vaultRepository.sync(forced = true )
2130
+ vaultRepository.sync(forced = false )
2131
2131
}
2132
2132
}
2133
2133
Original file line number Diff line number Diff line change @@ -1365,7 +1365,7 @@ class VaultViewModelTest : BaseViewModelTest() {
1365
1365
viewModel.trySendAction(VaultAction .RefreshPull )
1366
1366
1367
1367
verify(exactly = 1 ) {
1368
- vaultRepository.sync(forced = true )
1368
+ vaultRepository.sync(forced = false )
1369
1369
}
1370
1370
}
1371
1371
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class VerificationCodeViewModelTest : BaseViewModelTest() {
47
47
private val vaultRepository: VaultRepository = mockk {
48
48
every { vaultFilterType } returns VaultFilterType .AllVaults
49
49
every { getAuthCodesFlow() } returns mutableAuthCodeFlow.asStateFlow()
50
- every { sync(forced = true ) } just runs
50
+ every { sync(forced = any() ) } just runs
51
51
}
52
52
53
53
private val environmentRepository: EnvironmentRepository = mockk {
@@ -456,7 +456,7 @@ class VerificationCodeViewModelTest : BaseViewModelTest() {
456
456
viewModel.trySendAction(VerificationCodeAction .RefreshPull )
457
457
458
458
verify(exactly = 1 ) {
459
- vaultRepository.sync(forced = true )
459
+ vaultRepository.sync(forced = false )
460
460
}
461
461
}
462
462
You can’t perform that action at this time.
0 commit comments