Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 committed Oct 18, 2024
1 parent b89bd9e commit d061323
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions DuckDuckGo/NewTabPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,13 @@ final class NewTabPageViewController: UIHostingController<AnyView>, NewTabPage {
}

func openedAsNewTab(allowingKeyboard: Bool) {
guard allowingKeyboard && KeyboardSettings().onNewTab else { return }
if allowingKeyboard && KeyboardSettings().onNewTab {

// The omnibar is inside a collection view so this needs a chance to do its thing
// which might also be async. Not great.
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.launchNewSearch()
// The omnibar is inside a collection view so this needs a chance to do its thing
// which might also be async. Not great.
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.launchNewSearch()
}
}

if !variantManager.isContextualDaxDialogsEnabled {
Expand Down

0 comments on commit d061323

Please sign in to comment.