Continue fixing build errors.
This commit is contained in:
parent
c74201d163
commit
54ca352a70
|
@ -66,7 +66,12 @@ struct TimelineCellData {
|
||||||
self.showFeedName = showFeedName
|
self.showFeedName = showFeedName
|
||||||
|
|
||||||
self.favicon = nil
|
self.favicon = nil
|
||||||
self.read = article.read
|
if let status = article.status {
|
||||||
|
self.read = status.read
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
self.read = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init() { //Empty
|
init() { //Empty
|
||||||
|
|
|
@ -414,7 +414,7 @@ class TimelineViewController: NSViewController, NSTableViewDelegate, NSTableView
|
||||||
var fetchedArticles = [Article]()
|
var fetchedArticles = [Article]()
|
||||||
for (accountID, objects) in accountsDictionary {
|
for (accountID, objects) in accountsDictionary {
|
||||||
|
|
||||||
guard let oneAccount = AccountManager.sharedInstance.existingAccountWithIdentifier(accountID) else {
|
guard let oneAccount = account(with: accountID) else {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,11 +437,8 @@ class TimelineViewController: NSViewController, NSTableViewDelegate, NSTableView
|
||||||
|
|
||||||
private func calculateRowHeight() -> CGFloat {
|
private func calculateRowHeight() -> CGFloat {
|
||||||
|
|
||||||
let prototypeArticle = LocalArticle(account: AccountManager.sharedInstance.localAccount, feedID: "prototype", articleID: "prototype")
|
let longTitle = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
|
||||||
prototypeArticle.title = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
|
let prototypeArticle = Article(accountID: "prototype", articleID: "prototype", feedID: "prototype", uniqueID: "prototype", title: longTitle, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, bannerImageURL: nil, datePublished: nil, dateModified: nil, authors: nil, tags: nil, attachments: nil, accountInfo: nil)
|
||||||
|
|
||||||
let prototypeArticleStatus = LocalArticleStatus(articleID: "prototype", read: false, starred: false, userDeleted: false, dateArrived: Date())
|
|
||||||
prototypeArticle.status = prototypeArticleStatus
|
|
||||||
|
|
||||||
let prototypeCellData = TimelineCellData(article: prototypeArticle, appearance: cellAppearance, showFeedName: false)
|
let prototypeCellData = TimelineCellData(article: prototypeArticle, appearance: cellAppearance, showFeedName: false)
|
||||||
let height = timelineCellHeight(100, cellData: prototypeCellData, appearance: cellAppearance)
|
let height = timelineCellHeight(100, cellData: prototypeCellData, appearance: cellAppearance)
|
||||||
|
|
|
@ -75,7 +75,7 @@ public final class AccountManager: UnreadCountProvider {
|
||||||
|
|
||||||
// MARK: API
|
// MARK: API
|
||||||
|
|
||||||
public func existingAccountWithID(_ accountID: String) -> Account? {
|
public func existingAccount(with accountID: String) -> Account? {
|
||||||
|
|
||||||
return accountsDictionary[accountID]
|
return accountsDictionary[accountID]
|
||||||
}
|
}
|
||||||
|
@ -191,10 +191,10 @@ private func accountFilePathWithFolder(_ folderPath: String) -> String {
|
||||||
return NSString(string: folderPath).appendingPathComponent(accountDataFileName)
|
return NSString(string: folderPath).appendingPathComponent(accountDataFileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func accountWithID(_ accountID: String) -> Account? {
|
public func account(with accountID: String) -> Account? {
|
||||||
|
|
||||||
// Shortcut.
|
// Shortcut.
|
||||||
return AccountManager.sharedInstance.existingAccountWithID(accountID)
|
return AccountManager.sharedInstance.existingAccount(with: accountID)
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct AccountSpecifier {
|
private struct AccountSpecifier {
|
||||||
|
|
|
@ -13,7 +13,7 @@ public extension Article {
|
||||||
|
|
||||||
var account: Account? {
|
var account: Account? {
|
||||||
get {
|
get {
|
||||||
return accountWithID(accountID)
|
return account(with: accountID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ public extension Feed {
|
||||||
|
|
||||||
var account: Account? {
|
var account: Account? {
|
||||||
get {
|
get {
|
||||||
return accountWithID(accountID)
|
return account(with: accountID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public final class Folder: DisplayNameProvider, UnreadCountProvider {
|
||||||
|
|
||||||
public var account: Account? {
|
public var account: Account? {
|
||||||
get {
|
get {
|
||||||
return accountWithID(accountID)
|
return account(with: accountID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue