mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fixes #2335
The `ReleaseNotes` struct has been replaced with an extension on URL. Release Notes can now be opened on all versions of NNW.
This commit is contained in:
@@ -15,4 +15,17 @@ extension URL {
|
||||
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : 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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user