Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Nov 25, 2024
1 parent 3d350e3 commit f7b0998
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2821,11 +2821,11 @@ extension MainViewController: OnboardingDelegate {
}

extension MainViewController: OnboardingNavigationDelegate {
func navigateTo(url: URL) {
func navigateFromOnboarding(to url: URL) {
self.loadUrl(url, fromExternalLink: true)
}
func searchFor(_ query: String) {

func searchFromOnboarding(for query: String) {
self.loadQuery(query)
}
}
Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/TabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3080,12 +3080,12 @@ extension TabViewController: SaveLoginViewControllerDelegate {
}

extension TabViewController: OnboardingNavigationDelegate {
func searchFor(_ query: String) {

func searchFromOnboarding(for query: String) {
delegate?.tab(self, didRequestLoadQuery: query)
}

func navigateTo(url: URL) {
func navigateFromOnboarding(to url: URL) {
delegate?.tab(self, didRequestLoadURL: url)
}

Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ final class ContextualOnboardingDelegateMock: ContextualOnboardingDelegate {
func didTapDismissContextualOnboardingAction() {
didCallDidTapDismissContextualOnboardingAction = true
}
func searchFor(_ query: String) {

func searchFromOnboarding(for query: String) {
didCallSearchForQuery = true
}

func navigateTo(url: URL) {
func navigateFromOnboarding(to url: URL) {
didCallNavigateToURL = true
urlToNavigateTo = url
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ class CapturingOnboardingNavigationDelegate: OnboardingNavigationDelegate {
var suggestedSearchQuery: String?
var urlToNavigateTo: URL?

func searchFor(_ query: String) {
func searchFromOnboarding(for query: String) {
suggestedSearchQuery = query
}

func navigateTo(url: URL) {
func navigateFromOnboarding(to url: URL) {
urlToNavigateTo = url
}
}
4 changes: 2 additions & 2 deletions DuckDuckGoTests/ContextualOnboardingPresenterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ final class TabViewControllerMock: UIViewController, TabViewOnboardingDelegate {
didCallDidTapDismissAction = true
}

func searchFor(_ query: String) {
func searchFromOnboarding(for query: String) {
didCallSearchForQuery = true
capturedQuery = query
}

func navigateTo(url: URL) {
func navigateFromOnboarding(to url: URL) {
didCallNavigateToURL = true
capturedURL = url
}
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGoTests/OnboardingNavigationDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ final class OnboardingNavigationDelegateTests: XCTestCase {
let expectedUrl = try XCTUnwrap(URL.makeSearchURL(query: query, queryContext: nil))

// WHEN
mainVC.searchFor(query)
mainVC.searchFromOnboarding(for: query)

// THEN
assertExpected(queryURL: expectedUrl)
Expand All @@ -118,7 +118,7 @@ final class OnboardingNavigationDelegateTests: XCTestCase {
let expectedUrl = try XCTUnwrap(URL(string: site))

// WHEN
mainVC.navigateTo(url: expectedUrl)
mainVC.navigateFromOnboarding(to: expectedUrl)

// THEN
assertExpected(url: expectedUrl)
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGoTests/TabViewControllerDaxDialogTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final class TabViewControllerDaxDialogTests: XCTestCase {
XCTAssertNil(delegateMock.capturedQuery)

// WHEN
sut.searchFor(query)
sut.searchFromOnboarding(for: query)

// THEN
XCTAssertTrue(delegateMock.didRequestLoadQueryCalled)
Expand All @@ -68,7 +68,7 @@ final class TabViewControllerDaxDialogTests: XCTestCase {
XCTAssertNil(delegateMock.capturedURL)

// WHEN
sut.navigateTo(url: .ddg)
sut.navigateFromOnboarding(to: .ddg)

// THEN
XCTAssertTrue(delegateMock.didRequestLoadURLCalled)
Expand Down

0 comments on commit f7b0998

Please sign in to comment.