From e5977d86c4beeec4e047df8dadced78a136b52d9 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 21 Jun 2023 20:44:20 -0700 Subject: [PATCH] Open the release notes list rather than attempting to open the latest release notes page (on tapping Release Notes in settings). Because I keep messing up the tag for the latest release and we end up with a 404. --- Shared/Extensions/URL-Extensions.swift | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Shared/Extensions/URL-Extensions.swift b/Shared/Extensions/URL-Extensions.swift index f28ade9c1..ecf1ff3ef 100644 --- a/Shared/Extensions/URL-Extensions.swift +++ b/Shared/Extensions/URL-Extensions.swift @@ -20,19 +20,9 @@ extension URL { scheme == "mailto" ? self.string.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)?.url : nil } - /// URL pointing to current app version release notes. - static var releaseNotes: URL { - let appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" - var gitHub = "https://github.com/Ranchero-Software/NetNewsWire/releases/tag/" - #if os(macOS) - gitHub += "mac-\(String(describing: appVersion))" - return URL(string: gitHub)! - #else - gitHub += "ios-\(String(describing: appVersion))" - return URL(string: gitHub)! - #endif - } - + /// Reverse chronological list of release notes. + static var releaseNotes = URL(string: "https://github.com/Ranchero-Software/NetNewsWire/releases/")! + func valueFor(_ parameter: String) -> String? { guard let components = URLComponents(url: self, resolvingAgainstBaseURL: false), let queryItems = components.queryItems,