diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index 1be10fa22..1d40899bc 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -1144,7 +1144,7 @@ private extension MainWindowController { return currentLink != nil } - if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed { + if currentTimelineViewController?.selectedArticles.first?.webFeed != nil { toolbarButton.isEnabled = true } @@ -1171,7 +1171,7 @@ private extension MainWindowController { return currentLink != nil } - if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed { + if currentTimelineViewController?.selectedArticles.first?.webFeed != nil { toolbarButton.isEnabled = true } diff --git a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f107850d7..51a82bb37 100644 --- a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,51 +1,6 @@ { "object": { "pins": [ - { - "package": "BrightFutures", - "repositoryURL": "https://github.com/Thomvis/BrightFutures.git", - "state": { - "branch": null, - "revision": "939858b811026f85e87847a808f0bea2f187e5c4", - "version": "8.1.0" - } - }, - { - "package": "Erik", - "repositoryURL": "https://github.com/phimage/Erik.git", - "state": { - "branch": null, - "revision": "109a130e9cdb00789a43a7a625293eeb12d22989", - "version": "5.1.0" - } - }, - { - "package": "FileKit", - "repositoryURL": "https://github.com/nvzqz/FileKit.git", - "state": { - "branch": null, - "revision": "826d9161b184509f80d85c28cd612d630646de98", - "version": "6.0.0" - } - }, - { - "package": "Kanna", - "repositoryURL": "https://github.com/tid-kijyun/Kanna.git", - "state": { - "branch": null, - "revision": "f9e4922223dd0d3dfbf02ca70812cf5531fc0593", - "version": "5.2.7" - } - }, - { - "package": "OAuthSwift", - "repositoryURL": "https://github.com/OAuthSwift/OAuthSwift.git", - "state": { - "branch": null, - "revision": "fde77955e6983fbfaabd491709d52b8a82fda4d0", - "version": "2.1.2" - } - }, { "package": "PLCrashReporter", "repositoryURL": "https://github.com/microsoft/plcrashreporter.git", @@ -109,15 +64,6 @@ "version": "2.0.1" } }, - { - "package": "Swifter", - "repositoryURL": "https://github.com/httpswift/swifter.git", - "state": { - "branch": null, - "revision": "9483a5d459b45c3ffd059f7b55f9638e268632fd", - "version": "1.5.0" - } - }, { "package": "Zip", "repositoryURL": "https://github.com/marmelroy/Zip.git", diff --git a/Secrets/Package.swift b/Secrets/Package.swift index fdd6bc08a..80da648ec 100644 --- a/Secrets/Package.swift +++ b/Secrets/Package.swift @@ -8,16 +8,14 @@ let package = Package( .library( name: "Secrets", type: .dynamic, - targets: ["Secrets"]), - ], - dependencies: [ - .package(url: "https://github.com/OAuthSwift/OAuthSwift.git", .exact("2.1.2")), + targets: ["Secrets"] + ) ], + dependencies: [], targets: [ .target( name: "Secrets", - dependencies: [ - "OAuthSwift", - ]), + dependencies: [] + ) ] ) diff --git a/Secrets/Sources/Secrets/OAuth1SwiftProvider.swift b/Secrets/Sources/Secrets/OAuth1SwiftProvider.swift deleted file mode 100644 index 468061796..000000000 --- a/Secrets/Sources/Secrets/OAuth1SwiftProvider.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// OAuth1SwiftProvider.swift -// Secrets -// -// Created by Maurice Parker on 4/14/20. -// Copyright © 2020 Ranchero Software, LLC. All rights reserved. -// - -import Foundation -import OAuthSwift - -public protocol OAuth1SwiftProvider { - - static var oauth1Swift: OAuth1Swift { get } - static var callbackURL: URL { get } - -} diff --git a/Secrets/Sources/Secrets/OAuth2SwiftProvider.swift b/Secrets/Sources/Secrets/OAuth2SwiftProvider.swift deleted file mode 100644 index 13f5de5ca..000000000 --- a/Secrets/Sources/Secrets/OAuth2SwiftProvider.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// OAuth2SwiftProvider.swift -// Secrets -// -// Created by Maurice Parker on 5/2/20. -// Copyright © 2020 Ranchero Software, LLC. All rights reserved. -// - -import Foundation - -import OAuthSwift - -public protocol OAuth2SwiftProvider { - - static var oauth2Swift: OAuth2Swift { get } - static var callbackURL: URL { get } - static var oauth2Vars: (state: String, scope: String, params: [String: String]) { get } - -} diff --git a/Shared/Extensions/URL-Extensions.swift b/Shared/Extensions/URL-Extensions.swift index ecf1ff3ef..dd96df60e 100644 --- a/Shared/Extensions/URL-Extensions.swift +++ b/Shared/Extensions/URL-Extensions.swift @@ -17,7 +17,13 @@ extension URL { /// 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 + guard scheme == "mailto" else { + return nil + } + guard let urlString = absoluteString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else { + return nil + } + return URL(string: urlString) } /// Reverse chronological list of release notes. diff --git a/Technotes/Dependencies.markdown b/Technotes/Dependencies.markdown index 480e97958..e0007c7c6 100644 --- a/Technotes/Dependencies.markdown +++ b/Technotes/Dependencies.markdown @@ -4,25 +4,9 @@ In addition to our own frameworks (RSCore, RSDatabase, RSParser, RSTree, and RSW Thank you to the authors of these! -## [BrightFutures](https://github.com/Thomvis/BrightFutures) -Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW. - -## [Erik](https://github.com/phimage/Erik) -Required by OAuthSwift as a testing dependency. Not shipped in NNW. - -## [FileKit](https://github.com/nvzqz/FileKit) -Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW. - ## [FMDB](https://github.com/ccgus/fmdb) RSDatabase uses FMDB for SQLite persistence. -## [Kanna](https://github.com/tid-kijyun/Kanna) -Required by OAuthSwift as a testing dependency. Not shipped in NNW. - -## [OAuthSwift](https://github.com/OAuthSwift/OAuthSwift) -Our Reddit integration uses the OAuth framework to authenticate with the services -and then service requests to them. - ## [PLCrashReporter](https://github.com/microsoft/plcrashreporter) Used to collect crash reports and send them to Brent. Mac only. @@ -31,3 +15,5 @@ Used to provide application updates to users. Mac only. ## [Swifter](https://github.com/httpswift/swifter) Required by OAuthSwift as a testing dependency. Not shipped in NNW. + +## [Zip]