mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Make attachments use a DatabaseLookupTable.
This commit is contained in:
@@ -12,7 +12,7 @@ public final class Article: Hashable {
|
||||
|
||||
weak var account: Account?
|
||||
|
||||
public let databaseID: String
|
||||
public let articleID: String
|
||||
public let feedID: String // Likely a URL, but not necessarily
|
||||
public let uniqueID: String // Unique per feed (RSS guid, for example)
|
||||
public var title: String?
|
||||
|
||||
@@ -18,7 +18,7 @@ public struct Author: Hashable {
|
||||
public let emailAddress: String?
|
||||
public let hashValue: Int
|
||||
|
||||
public init?(databaseID: String?, name: String?, url: String?, avatarURL: String?, emailAddress: String?) {
|
||||
public init?(authorID: String?, name: String?, url: String?, avatarURL: String?, emailAddress: String?) {
|
||||
|
||||
if name == nil && url == nil && emailAddress == nil {
|
||||
return nil
|
||||
@@ -34,11 +34,11 @@ public struct Author: Hashable {
|
||||
s += emailAddress ?? ""
|
||||
self.hashValue = s.hashValue
|
||||
|
||||
if let databaseID = databaseID {
|
||||
self.databaseID = databaseID
|
||||
if let authorID = authorID {
|
||||
self.authorID = authorID
|
||||
}
|
||||
else {
|
||||
self.databaseID = databaseIDWithString(s)
|
||||
self.authorID = databaseIDWithString(s)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user