Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Addressed feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Aug 14, 2019
1 parent 62c4f36 commit 9524abc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Client/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3064,11 +3064,11 @@ extension BrowserViewController: PreferencesObserver {

// Destroy all tab data
tabManager.allTabs.forEach({
tabManager.removeAllBrowsingDataForTab($0, completionHandler: { [weak self] in
self?.tabManager.removeAll()
})
tabManager.removeAllBrowsingDataForTab($0)
})

tabManager.removeAll()

// Clear all persistent data
let clearables: [Clearable] = [
HistoryClearable(),
Expand All @@ -3078,11 +3078,11 @@ extension BrowserViewController: PreferencesObserver {
]

// Reset tab manager configuration
self.tabManager.resetConfiguration()
tabManager.resetConfiguration()
ClearPrivateDataTableViewController.clearPrivateData(clearables).uponQueue(DispatchQueue.main) { _ in

// Clear saved tab data
TabMO.deleteAllNormalTabs()
TabMO.deleteAll()
}
case Preferences.Shields.blockAdsAndTracking.key,
Preferences.Shields.httpsEverywhere.key,
Expand Down
4 changes: 0 additions & 4 deletions Data/models/TabMO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ public final class TabMO: NSManagedObject, CRUD {
deleteAll(context: .new(inMemory: false))
}

public class func deleteAllNormalTabs() {
deleteAll(predicate: NSPredicate(format: "isPrivate != true"), context: .new(inMemory: false))
}

public class func deleteAllPrivateTabs() {
deleteAll(predicate: NSPredicate(format: "isPrivate == true"), context: .new(inMemory: false))
}
Expand Down

0 comments on commit 9524abc

Please sign in to comment.