Tab picker: Allow multiple selection/deletion

This commit is contained in:
James Magahern
2021-02-11 19:20:06 -08:00
parent 94b0f4348c
commit 09c6204a73
5 changed files with 112 additions and 22 deletions

View File

@@ -251,9 +251,11 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat
activeTabObservation = tabController.$activeTabIndex
.receive(on: RunLoop.main)
.sink(receiveValue: { [unowned self] (activeTab: Int) in
let tab = tabController.tabs[activeTab]
if self.tab != tab {
self.tab = tab
if activeTab < tabController.tabs.count {
let tab = tabController.tabs[activeTab]
if self.tab != tab {
self.tab = tab
}
}
})