Fix Account-Database init method.
This commit is contained in:
parent
5860f774bd
commit
becbf3d7b0
|
@ -12,7 +12,7 @@ public final class Article: Hashable {
|
||||||
|
|
||||||
weak var account: Account?
|
weak var account: Account?
|
||||||
|
|
||||||
public let articleID: String
|
public let articleID: String // Unique database ID
|
||||||
public let feedID: String // Likely a URL, but not necessarily
|
public let feedID: String // Likely a URL, but not necessarily
|
||||||
public let uniqueID: String // Unique per feed (RSS guid, for example)
|
public let uniqueID: String // Unique per feed (RSS guid, for example)
|
||||||
public var title: String?
|
public var title: String?
|
||||||
|
|
|
@ -32,15 +32,12 @@ extension Article {
|
||||||
let bannerImageURL = row.string(forColumn: DatabaseKey.bannerImageURL)
|
let bannerImageURL = row.string(forColumn: DatabaseKey.bannerImageURL)
|
||||||
let datePublished = row.date(forColumn: DatabaseKey.datePublished)
|
let datePublished = row.date(forColumn: DatabaseKey.datePublished)
|
||||||
let dateModified = row.date(forColumn: DatabaseKey.dateModified)
|
let dateModified = row.date(forColumn: DatabaseKey.dateModified)
|
||||||
|
let accountInfo: [String: Any]? = nil // TODO
|
||||||
|
|
||||||
|
// authors, tags, and attachments are fetched from related tables, after init.
|
||||||
let authors: [Author]? = nil
|
let authors: [Author]? = nil
|
||||||
let tags: Set<String>? = nil
|
let tags: Set<String>? = nil
|
||||||
let attachments: [Attachment]? = nil
|
let attachments: [Attachment]? = nil
|
||||||
let accountInfo: [String: Any]? = nil
|
|
||||||
|
|
||||||
// let authors = PropertyListTransformer.authorsWithRow(row)
|
|
||||||
// let tags = PropertyListTransformer.tagsWithRow(row)
|
|
||||||
// let attachments = PropertyListTransformer.attachmentsWithRow(row)
|
|
||||||
// let accountInfo = accountInfoWithRow(row)
|
|
||||||
|
|
||||||
self.init(account: account, articleID: articleID, feedID: feedID, uniqueID: uniqueID, title: title, contentHTML: contentHTML, contentText: contentText, url: url, externalURL: externalURL, summary: summary, imageURL: imageURL, bannerImageURL: bannerImageURL, datePublished: datePublished, dateModified: dateModified, authors: authors, tags: tags, attachments: attachments, accountInfo: accountInfo)
|
self.init(account: account, articleID: articleID, feedID: feedID, uniqueID: uniqueID, title: title, contentHTML: contentHTML, contentText: contentText, url: url, externalURL: externalURL, summary: summary, imageURL: imageURL, bannerImageURL: bannerImageURL, datePublished: datePublished, dateModified: dateModified, authors: authors, tags: tags, attachments: attachments, accountInfo: accountInfo)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue