diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index b930c44a5..31daeb2ab 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -285,7 +285,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr tableView.scrollTo(row: 0, extraHeight: 0) } - tableView.rs_selectRow(nextRowIndex) + tableView.selectRow(nextRowIndex) let followingRowIndex = nextRowIndex - 1 if followingRowIndex < 0 { @@ -307,7 +307,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr tableView.scrollTo(row: tableMaxIndex, extraHeight: 0) } - tableView.rs_selectRow(nextRowIndex) + tableView.selectRow(nextRowIndex) let followingRowIndex = nextRowIndex + 1 if followingRowIndex > tableMaxIndex { @@ -412,7 +412,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr guard let ix = articles.firstIndex(where: { $0.articleID == articleID }) else { return } NSCursor.setHiddenUntilMouseMoves(true) - tableView.rs_selectRow(ix) + tableView.selectRow(ix) tableView.scrollTo(row: ix) } @@ -421,7 +421,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr return } NSCursor.setHiddenUntilMouseMoves(true) - tableView.rs_selectRow(ix) + tableView.selectRow(ix) tableView.scrollTo(row: ix) } @@ -443,7 +443,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr window.makeFirstResponderUnlessDescendantIsFirstResponder(tableView) if !hasAtLeastOneSelectedArticle && articles.count > 0 { - tableView.rs_selectRowAndScrollToVisible(0) + tableView.selectRowAndScrollToVisible(0) } } diff --git a/Mac/Scriptability/Account+Scriptability.swift b/Mac/Scriptability/Account+Scriptability.swift index 7d6f7428b..d0272c621 100644 --- a/Mac/Scriptability/Account+Scriptability.swift +++ b/Mac/Scriptability/Account+Scriptability.swift @@ -170,6 +170,6 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta case .freshRSS: osType = "Frsh" } - return osType.fourCharCode() + return osType.fourCharCode } } diff --git a/Mac/Scriptability/NSScriptCommand+NetNewsWire.swift b/Mac/Scriptability/NSScriptCommand+NetNewsWire.swift index 6d7db56d3..1cc5e36e5 100644 --- a/Mac/Scriptability/NSScriptCommand+NetNewsWire.swift +++ b/Mac/Scriptability/NSScriptCommand+NetNewsWire.swift @@ -22,7 +22,7 @@ extension NSScriptCommand { func isCreateCommand(forClass whatClass:String) -> Bool { guard let arguments = self.arguments else {return false} guard let newObjectClass = arguments["ObjectClass"] as? Int else {return false} - guard (newObjectClass.fourCharCode() == whatClass.fourCharCode()) else {return false} + guard (newObjectClass.fourCharCode == whatClass.fourCharCode) else {return false} return true } @@ -36,12 +36,12 @@ extension NSScriptCommand { print("insertionLocation : \(insertionLocationDescriptor)") // insertion location can be a typeObjectSpecifier, e.g. 'in account "Acct"' // or a typeInsertionLocation, e.g. 'at end of folder " - if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode()) { - descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode()) - } else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode()) { + if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode) { + descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode) + } else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode) { descriptorToConsider = insertionLocationDescriptor } - } else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode()) { + } else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode) { descriptorToConsider = subjectDescriptor } diff --git a/Shared/ArticleStyles/ArticleStylesManager.swift b/Shared/ArticleStyles/ArticleStylesManager.swift index fa8bea895..df70605b3 100644 --- a/Shared/ArticleStyles/ArticleStylesManager.swift +++ b/Shared/ArticleStyles/ArticleStylesManager.swift @@ -6,7 +6,12 @@ // Copyright © 2015 Ranchero Software, LLC. All rights reserved. // -import Foundation +#if os(macOS) +import AppKit +#else +import UIKit +#endif + import RSCore let ArticleStyleNamesDidChangeNotification = "ArticleStyleNamesDidChangeNotification" diff --git a/Shared/Commands/SendToMarsEditCommand.swift b/Shared/Commands/SendToMarsEditCommand.swift index bcf277ac6..7b50f07fa 100644 --- a/Shared/Commands/SendToMarsEditCommand.swift +++ b/Shared/Commands/SendToMarsEditCommand.swift @@ -57,7 +57,7 @@ private extension SendToMarsEditCommand { let body = article.contentHTML ?? article.contentText ?? article.summary let authorName = article.authors?.first?.name - let sender = SendToBlogEditorApp(targetDesciptor: targetDescriptor, title: article.title, body: body, summary: article.summary, link: article.externalURL, permalink: article.url, subject: nil, creator: authorName, commentsURL: nil, guid: article.uniqueID, sourceName: article.webFeed?.nameForDisplay, sourceHomeURL: article.webFeed?.homePageURL, sourceFeedURL: article.webFeed?.url) + let sender = SendToBlogEditorApp(targetDescriptor: targetDescriptor, title: article.title, body: body, summary: article.summary, link: article.externalURL, permalink: article.url, subject: nil, creator: authorName, commentsURL: nil, guid: article.uniqueID, sourceName: article.webFeed?.nameForDisplay, sourceHomeURL: article.webFeed?.homePageURL, sourceFeedURL: article.webFeed?.url) let _ = sender.send() } diff --git a/Shared/Extensions/IconImage.swift b/Shared/Extensions/IconImage.swift index 83f9ff118..8d0a6c8b2 100644 --- a/Shared/Extensions/IconImage.swift +++ b/Shared/Extensions/IconImage.swift @@ -6,7 +6,12 @@ // Copyright © 2019 Ranchero Software. All rights reserved. // -import Foundation +#if os(macOS) +import AppKit +#else +import UIKit +#endif + import RSCore final class IconImage { diff --git a/Shared/SmartFeeds/PseudoFeed.swift b/Shared/SmartFeeds/PseudoFeed.swift index 8a9c7769d..5c0dc0660 100644 --- a/Shared/SmartFeeds/PseudoFeed.swift +++ b/Shared/SmartFeeds/PseudoFeed.swift @@ -29,7 +29,7 @@ extension PseudoFeed { } #else -import Foundation +import UIKit import Articles import Account import RSCore diff --git a/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift b/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift index f65467310..372d9923f 100644 --- a/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift +++ b/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift @@ -22,7 +22,7 @@ extension NSAppleEventDescriptor { print ("error: usrfDictionary() expected input to be a record") return [:] } - guard let usrfList = self.forKeyword("usrf".fourCharCode()) else { + guard let usrfList = self.forKeyword("usrf".fourCharCode) else { print ("error: usrfDictionary() couldn't find usrf") return [:] } diff --git a/submodules/RSCore b/submodules/RSCore index 070f40e9b..2eca01e52 160000 --- a/submodules/RSCore +++ b/submodules/RSCore @@ -1 +1 @@ -Subproject commit 070f40e9b39ac428d09eafeb8b47ce8dde78ced8 +Subproject commit 2eca01e52f7b722b25523d46d2341baa54dca6d1