Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit force reloading in Tab.reload() #2361

Merged
merged 2 commits into from
Mar 8, 2024
Merged
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
2 changes: 1 addition & 1 deletion DuckDuckGo/Tab/Model/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,8 @@ protocol NewWindowPolicyDecisionMaker {
return nil
}

self.content = content.forceReload()
if webView.url == nil, content.isUrl {
self.content = content.forceReload()
// load from cache or interactionStateData when called by lazy loader
return reloadIfNeeded(shouldLoadInBackground: true)
} else {
Expand Down
1 change: 1 addition & 0 deletions IntegrationTests/Tab/AddressBarTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@
}

func testWhenTabReloaded_addressBarIsDeactivated() async throws {
throw XCTSkip("https://app.asana.com/0/0/1206791095409241/1206794776988117/f")
let tab = Tab(content: .url(.duckDuckGo, credential: nil, source: .webViewUpdated), webViewConfiguration: webViewConfiguration, privacyFeatures: privacyFeaturesMock)

Check warning on line 464 in IntegrationTests/Tab/AddressBarTests.swift

View workflow job for this annotation

GitHub Actions / Test (Sandbox)

code after 'throw' will never be executed

Check warning on line 464 in IntegrationTests/Tab/AddressBarTests.swift

View workflow job for this annotation

GitHub Actions / Test (Sandbox)

code after 'throw' will never be executed

Check warning on line 464 in IntegrationTests/Tab/AddressBarTests.swift

View workflow job for this annotation

GitHub Actions / Test (Non-Sandbox)

code after 'throw' will never be executed
let viewModel = TabCollectionViewModel(tabCollection: TabCollection(tabs: [tab]))
window = WindowsManager.openNewWindow(with: viewModel)!

Expand Down
Loading