Update to latest RSCore

This commit is contained in:
Nate Weaver
2020-03-18 19:58:29 -05:00
parent 33081a3443
commit 7a9095b63a
44 changed files with 116 additions and 114 deletions

View File

@@ -98,8 +98,8 @@ class AddFeedController: AddFeedWindowControllerDelegate {
private extension AddFeedController {
var urlStringFromPasteboard: String? {
if let urlString = NSPasteboard.rs_urlString(from: NSPasteboard.general) {
return urlString.rs_normalizedURL()
if let urlString = NSPasteboard.urlString(from: NSPasteboard.general) {
return urlString.normalizedURL
}
return nil
}

View File

@@ -36,7 +36,7 @@ class AddFeedWindowController : NSWindowController {
private var userEnteredTitle: String? {
var s = nameTextField.stringValue
s = s.rs_stringWithCollapsedWhitespace()
s = s.collapsingWhitespace
if s.isEmpty {
return nil
}
@@ -94,7 +94,7 @@ class AddFeedWindowController : NSWindowController {
@IBAction func addFeed(_ sender: Any?) {
let urlString = urlTextField.stringValue
let normalizedURLString = (urlString as NSString).rs_normalizedURL()
let normalizedURLString = urlString.normalizedURL
if normalizedURLString.isEmpty {
cancelSheet()
@@ -137,7 +137,7 @@ class AddFeedWindowController : NSWindowController {
private extension AddFeedWindowController {
private func updateUI() {
addButton.isEnabled = urlTextField.stringValue.rs_stringMayBeURL()
addButton.isEnabled = urlTextField.stringValue.mayBeURL
}
func cancelSheet() {