Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #3275 - Invoke pending single session delete job on close all #3438

Merged
merged 1 commit into from
Jun 13, 2019
Merged
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
11 changes: 10 additions & 1 deletion app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,16 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
}
}
is TabAction.CloseAll -> {
removeAllTabsWithUndo(action.private)
if (pendingSessionDeletion?.deletionJob == null) removeAllTabsWithUndo(action.private) else {
pendingSessionDeletion?.deletionJob?.let {
launch {
it.invoke()
}.invokeOnCompletion {
pendingSessionDeletion = null
removeAllTabsWithUndo(action.private)
}
}
}
}
is TabAction.PrivateBrowsingLearnMore -> {
(activity as HomeActivity).openToBrowserAndLoad(
Expand Down