Update to latest RSCore

This commit is contained in:
Nate Weaver 2020-01-12 18:38:04 -06:00
parent 8b07924693
commit 58c90feccf
9 changed files with 27 additions and 17 deletions

View File

@ -285,7 +285,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
tableView.scrollTo(row: 0, extraHeight: 0) tableView.scrollTo(row: 0, extraHeight: 0)
} }
tableView.rs_selectRow(nextRowIndex) tableView.selectRow(nextRowIndex)
let followingRowIndex = nextRowIndex - 1 let followingRowIndex = nextRowIndex - 1
if followingRowIndex < 0 { if followingRowIndex < 0 {
@ -307,7 +307,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
tableView.scrollTo(row: tableMaxIndex, extraHeight: 0) tableView.scrollTo(row: tableMaxIndex, extraHeight: 0)
} }
tableView.rs_selectRow(nextRowIndex) tableView.selectRow(nextRowIndex)
let followingRowIndex = nextRowIndex + 1 let followingRowIndex = nextRowIndex + 1
if followingRowIndex > tableMaxIndex { if followingRowIndex > tableMaxIndex {
@ -412,7 +412,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
guard let ix = articles.firstIndex(where: { $0.articleID == articleID }) else { return } guard let ix = articles.firstIndex(where: { $0.articleID == articleID }) else { return }
NSCursor.setHiddenUntilMouseMoves(true) NSCursor.setHiddenUntilMouseMoves(true)
tableView.rs_selectRow(ix) tableView.selectRow(ix)
tableView.scrollTo(row: ix) tableView.scrollTo(row: ix)
} }
@ -421,7 +421,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
return return
} }
NSCursor.setHiddenUntilMouseMoves(true) NSCursor.setHiddenUntilMouseMoves(true)
tableView.rs_selectRow(ix) tableView.selectRow(ix)
tableView.scrollTo(row: ix) tableView.scrollTo(row: ix)
} }
@ -443,7 +443,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
window.makeFirstResponderUnlessDescendantIsFirstResponder(tableView) window.makeFirstResponderUnlessDescendantIsFirstResponder(tableView)
if !hasAtLeastOneSelectedArticle && articles.count > 0 { if !hasAtLeastOneSelectedArticle && articles.count > 0 {
tableView.rs_selectRowAndScrollToVisible(0) tableView.selectRowAndScrollToVisible(0)
} }
} }

View File

@ -170,6 +170,6 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
case .freshRSS: case .freshRSS:
osType = "Frsh" osType = "Frsh"
} }
return osType.fourCharCode() return osType.fourCharCode
} }
} }

View File

@ -22,7 +22,7 @@ extension NSScriptCommand {
func isCreateCommand(forClass whatClass:String) -> Bool { func isCreateCommand(forClass whatClass:String) -> Bool {
guard let arguments = self.arguments else {return false} guard let arguments = self.arguments else {return false}
guard let newObjectClass = arguments["ObjectClass"] as? Int 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 return true
} }
@ -36,12 +36,12 @@ extension NSScriptCommand {
print("insertionLocation : \(insertionLocationDescriptor)") print("insertionLocation : \(insertionLocationDescriptor)")
// insertion location can be a typeObjectSpecifier, e.g. 'in account "Acct"' // insertion location can be a typeObjectSpecifier, e.g. 'in account "Acct"'
// or a typeInsertionLocation, e.g. 'at end of folder " // or a typeInsertionLocation, e.g. 'at end of folder "
if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode()) { if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode) {
descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode()) descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode)
} else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode()) { } else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode) {
descriptorToConsider = insertionLocationDescriptor descriptorToConsider = insertionLocationDescriptor
} }
} else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode()) { } else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode) {
descriptorToConsider = subjectDescriptor descriptorToConsider = subjectDescriptor
} }

View File

@ -6,7 +6,12 @@
// Copyright © 2015 Ranchero Software, LLC. All rights reserved. // Copyright © 2015 Ranchero Software, LLC. All rights reserved.
// //
import Foundation #if os(macOS)
import AppKit
#else
import UIKit
#endif
import RSCore import RSCore
let ArticleStyleNamesDidChangeNotification = "ArticleStyleNamesDidChangeNotification" let ArticleStyleNamesDidChangeNotification = "ArticleStyleNamesDidChangeNotification"

View File

@ -57,7 +57,7 @@ private extension SendToMarsEditCommand {
let body = article.contentHTML ?? article.contentText ?? article.summary let body = article.contentHTML ?? article.contentText ?? article.summary
let authorName = article.authors?.first?.name 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() let _ = sender.send()
} }

View File

@ -6,7 +6,12 @@
// Copyright © 2019 Ranchero Software. All rights reserved. // Copyright © 2019 Ranchero Software. All rights reserved.
// //
import Foundation #if os(macOS)
import AppKit
#else
import UIKit
#endif
import RSCore import RSCore
final class IconImage { final class IconImage {

View File

@ -29,7 +29,7 @@ extension PseudoFeed {
} }
#else #else
import Foundation import UIKit
import Articles import Articles
import Account import Account
import RSCore import RSCore

View File

@ -22,7 +22,7 @@ extension NSAppleEventDescriptor {
print ("error: usrfDictionary() expected input to be a record") print ("error: usrfDictionary() expected input to be a record")
return [:] return [:]
} }
guard let usrfList = self.forKeyword("usrf".fourCharCode()) else { guard let usrfList = self.forKeyword("usrf".fourCharCode) else {
print ("error: usrfDictionary() couldn't find usrf") print ("error: usrfDictionary() couldn't find usrf")
return [:] return [:]
} }

@ -1 +1 @@
Subproject commit 070f40e9b39ac428d09eafeb8b47ce8dde78ced8 Subproject commit 2eca01e52f7b722b25523d46d2341baa54dca6d1