1
0
Fork 0

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

master
Emily Kager 2019-06-13 10:58:45 -07:00 committed by Colin Lee
parent 1212887e08
commit 1f1320920f
1 changed files with 10 additions and 1 deletions

View File

@ -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(