Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ class ImportLoginsViewModel @Inject constructor(
}

private fun handleFailedSyncAcknowledged() {
mutableStateFlow.update {
it.copy(dialogState = null)
}
dismissDialog()
firstTimeActionManager.storeShowImportLogins(showImportLogins = false)
firstTimeActionManager.storeShowImportLoginsSettingsBadge(showBadge = true)
sendEvent(ImportLoginsEvent.NavigateBack)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() {
}

@Test
fun `FailSyncAcknowledged should remove dialog state and send NavigateBack event`() =
fun `FailSyncAcknowledged clears dialog, navigates back, and stores first time values`() =
runTest {
coEvery {
vaultRepository.syncForResult(forced = true)
Expand All @@ -447,6 +447,10 @@ class ImportLoginsViewModelTest : BaseViewModelTest() {
awaitItem(),
)
}
verify(exactly = 1) {
firstTimeActionManager.storeShowImportLogins(showImportLogins = false)
firstTimeActionManager.storeShowImportLoginsSettingsBadge(showBadge = true)
}
}

@Suppress("MaxLineLength")
Expand Down
Loading