Skip to content

Commit

Permalink
speculative fix to main vc related crash (#2864)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/392891325557410/1207313758905436/f
Tech Design URL:
CC:

Description:
Be less aggressive about forcing view layout update and ask nicely for constraints to be updated at the next opportunity.
  • Loading branch information
brindy authored May 16, 2024
1 parent 4724094 commit 17b765f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,11 @@ extension MainViewController: BrowserChromeDelegate {
let updateBlock = {
self.updateToolbarConstant(percent)
self.updateNavBarConstant(percent)
self.view.needsUpdateConstraints()

self.viewCoordinator.navigationBarContainer.alpha = percent
self.viewCoordinator.tabBarContainer.alpha = percent
self.viewCoordinator.toolbar.alpha = percent

self.view.layoutIfNeeded()
}

if animated {
Expand Down

0 comments on commit 17b765f

Please sign in to comment.