Skip to content

Commit

Permalink
Fix brave#2155 - Clearing partial data destroys all tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
dvng88 committed Jan 9, 2020
1 parent 1c66747 commit 0a82431
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class ClearPrivateDataTableViewController: UITableViewController {

// Reset Webkit configuration to remove data from memory
if clear.contains(where: { $0 is CookiesAndCacheClearable || $0 is CacheClearable }) {
self.tabManager.removeAll()
self.tabManager.resetConfiguration()
// Unlock the folders to allow clearing of data.
if Preferences.Privacy.blockAllCookies.value {
Expand Down Expand Up @@ -210,7 +211,6 @@ class ClearPrivateDataTableViewController: UITableViewController {
let clearAction = UIAlertAction(title: Strings.ClearPrivateData, style: .destructive) { (_) in
Preferences.Privacy.clearPrivateDataToggles.value = self.toggles
self.clearButtonEnabled = false
self.tabManager.removeAll()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
if !self.gotNotificationDeathOfAllWebViews {
self.allWebViewsKilled()
Expand Down

0 comments on commit 0a82431

Please sign in to comment.