Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ extension UIStackView {
animateClosure: @escaping () -> Void,
animated: Bool = true,
completion: (() -> Void)?) {
view.layoutIfNeeded()

UIView.animate(
withDuration: animated ? 0.25 : 0,
animations: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class BrowserViewController: UIViewController,
var zoomPageBar: ZoomPageBar?
var addressBarPanGestureHandler: AddressBarPanGestureHandler?
var microsurvey: MicrosurveyPromptView?
var keyboardBackdrop: UIView?
var pendingToast: Toast? // A toast that might be waiting for BVC to appear before displaying
var downloadToast: DownloadToast? // A toast that is showing the combined download progress
var downloadProgressManager: DownloadProgressManager?
Expand Down Expand Up @@ -2227,18 +2226,6 @@ class BrowserViewController: UIViewController,

guard let searchController = self.searchController else { return }

// This needs to be added to ensure during animation of the keyboard,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad we can remove this! This was a hacky thing at the time for the legacy toolbar in 2022 😆. I pulled the branch to test that particular use case just in case and all LGTM!

// No content is showing in between the bottom search bar and the searchViewController
if isBottomSearchBar, keyboardBackdrop == nil {
keyboardBackdrop = UIView()
keyboardBackdrop?.backgroundColor = currentTheme().colors.layer1
view.insertSubview(keyboardBackdrop!, belowSubview: overKeyboardContainer)
keyboardBackdrop?.snp.makeConstraints { make in
make.edges.equalTo(view)
}
view.bringSubviewToFront(bottomContainer)
}

addChild(searchController)
view.addSubview(searchController.view)
searchController.view.translatesAutoresizingMaskIntoConstraints = false
Expand Down Expand Up @@ -2267,9 +2254,6 @@ class BrowserViewController: UIViewController,
searchController.view.removeFromSuperview()
searchController.removeFromParent()

keyboardBackdrop?.removeFromSuperview()
keyboardBackdrop = nil

contentContainer.accessibilityElementsHidden = false
}

Expand Down Expand Up @@ -3861,7 +3845,6 @@ class BrowserViewController: UIViewController,
let currentTheme = currentTheme()
statusBarOverlay.hasTopTabs = toolbarHelper.shouldShowTopTabs(for: traitCollection)
statusBarOverlay.applyTheme(theme: currentTheme)
keyboardBackdrop?.backgroundColor = currentTheme.colors.layer1

// to make sure on homepage with bottom search bar the status bar is hidden
// we have to adjust the background color to match the homepage background color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class BaseAlphaStackView: UIStackView, AlphaDimmable, ThemeApplicable {
spacer.bottomAnchor.constraint(equalTo: self.bottomAnchor)
])
insetSpacer = spacer
layoutIfNeeded()
}

func moveSpacerToBack() {
Expand All @@ -115,7 +114,6 @@ class BaseAlphaStackView: UIStackView, AlphaDimmable, ThemeApplicable {

removeArrangedView(insetSpacer)
self.insetSpacer = nil
layoutIfNeeded()
}

func applyTheme(theme: Theme) {
Expand Down