@@ -129,13 +129,15 @@ final class MainViewController: NSViewController {
129
129
tabBarViewController. view. isHidden = true
130
130
mainView. tabBarContainerView. isHidden = true
131
131
mainView. navigationBarTopConstraint. constant = 0.0
132
- mainView. addressBarHeightConstraint. constant = mainView. tabBarContainerView. frame. height
132
+ resizeNavigationBar ( isHomePage: false , animated: false )
133
+
133
134
updateBookmarksBarViewVisibility ( visible: false )
134
135
} else {
135
136
mainView. navigationBarContainerView. wantsLayer = true
136
137
mainView. navigationBarContainerView. layer? . masksToBounds = false
137
138
138
- resizeNavigationBarForHomePage ( tabCollectionViewModel. selectedTabViewModel? . tab. content == . newtab, animated: false )
139
+ resizeNavigationBar ( isHomePage: tabCollectionViewModel. selectedTabViewModel? . tab. content == . newtab,
140
+ animated: false )
139
141
140
142
let bookmarksBarVisible = AppearancePreferences . shared. showBookmarksBar
141
143
updateBookmarksBarViewVisibility ( visible: bookmarksBarVisible)
@@ -291,7 +293,7 @@ final class MainViewController: NSViewController {
291
293
}
292
294
}
293
295
294
- private func resizeNavigationBarForHomePage ( _ homePage: Bool , animated: Bool ) {
296
+ private func resizeNavigationBar ( isHomePage homePage: Bool , animated: Bool ) {
295
297
updateDividerColor ( isShowingHomePage: homePage)
296
298
navigationBarViewController. resizeAddressBar ( for: homePage ? . homePage : ( isInPopUpWindow ? . popUpWindow : . default) , animated: animated)
297
299
}
@@ -303,7 +305,7 @@ final class MainViewController: NSViewController {
303
305
guard let self, let selectedTabViewModel else { return }
304
306
defer { lastTabContent = content }
305
307
306
- resizeNavigationBarForHomePage ( content == . newtab, animated: content == . newtab && lastTabContent != . newtab)
308
+ resizeNavigationBar ( isHomePage : content == . newtab, animated: content == . newtab && lastTabContent != . newtab)
307
309
updateBookmarksBar ( content)
308
310
adjustFirstResponder ( selectedTabViewModel: selectedTabViewModel, tabContent: content)
309
311
}
0 commit comments