TabController: More sensible next tab auto-selection

This commit is contained in:
James Magahern
2021-02-15 18:54:32 -08:00
parent 97894f5d61
commit 6eb320bf7a
2 changed files with 6 additions and 6 deletions

View File

@@ -43,7 +43,11 @@ class TabController
tabs.remove(at: index)
if tabs.count > 0 {
activeTabIndex = tabs.count - 1
if index < tabs.count {
activeTabIndex = index
} else {
activeTabIndex = tabs.count - 1
}
} else {
_ = createNewTab(url: nil)
activeTabIndex = 0