Remove name from the feed metadata as we manage it using the OPML file instead

This commit is contained in:
Maurice Parker 2019-09-23 12:29:48 -05:00
parent f1819fb39c
commit eaf798991f
3 changed files with 7 additions and 22 deletions

View File

@ -65,18 +65,7 @@ public final class Feed: DisplayNameProvider, Renamable, UnreadCountProvider, Ha
}
}
public var name: String? {
get {
return metadata.name
}
set {
let oldNameForDisplay = nameForDisplay
metadata.name = newValue
if oldNameForDisplay != newValue {
postDisplayNameDidChangeNotification()
}
}
}
public var name: String?
public var authors: Set<Author>? {
get {

View File

@ -21,7 +21,6 @@ final class FeedMetadata: Codable {
case homePageURL
case iconURL
case faviconURL
case name
case editedName
case authors
case contentHash
@ -63,14 +62,6 @@ final class FeedMetadata: Codable {
}
}
var name: String? {
didSet {
if name != oldValue {
valueDidChange(.name)
}
}
}
var editedName: String? {
didSet {
if editedName != oldValue {

View File

@ -52,7 +52,12 @@ final class FeedlyCreateFeedsForCollectionFoldersOperation: FeedlySyncOperation
let url = collectionFeed.id
let metadata = FeedMetadata(feedID: url)
// TODO: More metadata
metadata.name = collectionFeed.title
// Kiel, I'm commenting this out as we shouldn't be storing the name
// in the feed metadata. It should be stored in the OPML file.
// You can just set the name directly on the feed itself.
// metadata.name = collectionFeed.title
let feed = Feed(account: account, url: url, metadata: metadata)
// So the same feed isn't created more than once.