Merge branch '7.1.3-pre' of https://github.com/Ranchero-Software/NetNewsWire into 7.1.3-pre

This commit is contained in:
Brent Simmons committed 2026-07-29 10:23:34 -07:00
commit 3b8ebc6bc1
17 files changed
+186 -78

No files matched your search

+1
View File
@@ -63,6 +63,7 @@ import Images
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FaviconGenerator.templateImage = Assets.Images.faviconTemplate
WebViewConfiguration.resolveBrowserUserAgent()
Task {
await WebViewConfiguration.compileContentBlockingRules()
}
+12 -1
View File
@@ -703,7 +703,7 @@ private extension WebViewController {
guard let imageURL = URL(string: clickMessage.imageURL) else { return }
Downloader.shared.download(imageURL) { [weak self] downloadResponse, error in
Downloader.shared.download(imageURL, userAgentStyle: .browser) { [weak self] downloadResponse, error in
guard let self, let data = downloadResponse.data, error == nil, !data.isEmpty,
let image = UIImage(data: data) else {
return
@@ -888,10 +888,21 @@ private extension WebViewController {
guard let viewController = SFSafariViewController.safeSafariViewController(url) else {
return
}
viewController.delegate = self
coordinator?.beganBrowsing(url: url)
present(viewController, animated: true)
}
}
// MARK: SFSafariViewControllerDelegate
extension WebViewController: @preconcurrency SFSafariViewControllerDelegate {
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
coordinator?.endedBrowsing()
}
}
// MARK: Find in Article
private struct FindInArticleOptions: Codable {
+8
View File
@@ -1528,6 +1528,14 @@ struct SidebarItemNode: Hashable, Sendable {
}
}
func beganBrowsing(url: URL) {
activityManager.browsing(url: url)
}
func endedBrowsing() {
activityManager.invalidateBrowsing()
}
func navigateToFeeds() {
mainFeedCollectionViewController?.focus()
selectArticle(nil)
+3 -26
View File
@@ -192,32 +192,9 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
return
}
if let providedThemeURL = queryItems.first(where: { $0.name == "url" })?.value {
if let themeURL = URL(string: providedThemeURL) {
let request = URLRequest(url: themeURL)
DispatchQueue.main.async {
NotificationCenter.default.post(name: .didBeginDownloadingTheme, object: nil)
}
let task = URLSession.shared.downloadTask(with: request) { location, _, error in
guard
let location = location else { return }
Task { @MainActor in
do {
try ArticleThemeDownloader.shared.handleFile(at: location)
} catch {
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
}
}
}
task.resume()
} else {
print("No theme URL")
return
}
} else {
return
if let providedThemeURL = queryItems.first(where: { $0.name == "url" })?.value,
let themeURL = URL(string: providedThemeURL) {
ArticleThemeDownloader.shared.downloadTheme(from: themeURL)
}
}
}