Merge pull request #725 from tgt/tgt/feedbin-fixes

Various Minor Feedbin Fixes
This commit is contained in:
Maurice Parker 2019-06-06 15:27:06 -05:00 committed by GitHub
commit e7ec59f31f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View File

@ -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()
}
}

View File

@ -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 {

View File

@ -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)