diff --git a/Frameworks/Account/Feed.swift b/Frameworks/Account/Feed.swift index 5b416bcf8..c0b3cb9cd 100644 --- a/Frameworks/Account/Feed.swift +++ b/Frameworks/Account/Feed.swift @@ -64,7 +64,7 @@ public final class Feed: DisplayNameProvider, Renamable, UnreadCountProvider, Ha set { let oldNameForDisplay = nameForDisplay metadata.name = newValue - if oldNameForDisplay != nameForDisplay { + if oldNameForDisplay != newValue { postDisplayNameDidChangeNotification() } } diff --git a/Frameworks/Account/FeedFinder/FeedSpecifier.swift b/Frameworks/Account/FeedFinder/FeedSpecifier.swift index 68073198e..f90e956fe 100644 --- a/Frameworks/Account/FeedFinder/FeedSpecifier.swift +++ b/Frameworks/Account/FeedFinder/FeedSpecifier.swift @@ -46,7 +46,7 @@ struct FeedSpecifier: Hashable { return feedSpecifiers.anyObject() } - var currentHighScore = 0 + var currentHighScore = Int.min var currentBestFeed: FeedSpecifier? = nil for oneFeedSpecifier in feedSpecifiers { diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index 878b1067b..a6b0ba756 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -88,11 +88,13 @@ final class FeedbinAccountDelegate: AccountDelegate { case .success(): self.refreshArticles(account) { - self.refreshArticleStatus(for: account) { - self.refreshMissingArticles(account) { - self.refreshProgress.clear() - DispatchQueue.main.async { - completion(.success(())) + self.sendArticleStatus(for: account) { + self.refreshArticleStatus(for: account) { + self.refreshMissingArticles(account) { + self.refreshProgress.clear() + DispatchQueue.main.async { + completion(.success(())) + } } } } @@ -690,7 +692,10 @@ private extension FeedbinAccountDelegate { DispatchQueue.main.sync { if let feed = account.idToFeedDictionary[subFeedId] { feed.name = subscription.name + // If the name has been changed on the server remove the locally edited name + feed.editedName = nil feed.homePageURL = subscription.homePageURL + feed.subscriptionID = String(subscription.subscriptionID) } else { let feed = account.createFeed(with: subscription.name, url: subscription.url, feedID: subFeedId, homePageURL: subscription.homePageURL) feed.subscriptionID = String(subscription.subscriptionID)