2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/20367 - Fixes removeAllTabs adding to recently closed

`removeAllTabs` will now no longer allow `UndoMiddleware` from recovering the tabs.
This commit is contained in:
codrut.topliceanu 2021-07-16 19:08:20 +03:00 committed by mergify[bot]
parent 9351cda82e
commit 8541d3f449
5 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class DefaultDeleteBrowsingDataController(
override suspend fun deleteTabs() {
withContext(coroutineContext) {
removeAllTabs.invoke()
removeAllTabs.invoke(false)
}
}

View File

@ -71,7 +71,7 @@ class DefaultDeleteBrowsingDataControllerTest {
controller.deleteTabs()
verify {
removeAllTabs.invoke()
removeAllTabs.invoke(false)
}
}

View File

@ -75,7 +75,7 @@ class DeleteAndQuitTest {
verifyOrder {
snackbar.show()
removeAllTabsUseCases.invoke()
removeAllTabsUseCases.invoke(false)
activity.finishAndRemoveTask()
}

View File

@ -106,7 +106,7 @@ class CloseOnLastTabBindingTest {
binding.start()
browserStore.dispatch(TabListAction.RemoveAllTabsAction)
browserStore.dispatch(TabListAction.RemoveAllTabsAction())
browserStore.waitUntilIdle()

View File

@ -135,7 +135,7 @@ class TelemetryMiddlewareTest {
assertEquals(2, settings.openTabsCount)
verify(exactly = 1) { metrics.track(Event.HaveOpenTabs) }
store.dispatch(TabListAction.RemoveAllTabsAction).joinBlocking()
store.dispatch(TabListAction.RemoveAllTabsAction()).joinBlocking()
assertEquals(0, settings.openTabsCount)
verify(exactly = 1) { metrics.track(Event.HaveNoOpenTabs) }
}