mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adds to the URL-Extensions file
This commit is contained in:
@@ -15,6 +15,11 @@ extension URL {
|
||||
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||
}
|
||||
|
||||
/// Percent encoded `mailto` URL for use with `canOpenUrl`. If the URL doesn't contain the `mailto` scheme, this is `nil`.
|
||||
var percentEncodedEmailAddress: 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 ?? ""
|
||||
|
||||
Reference in New Issue
Block a user