Merge pull request #725 from tgt/tgt/feedbin-fixes
Various Minor Feedbin Fixes
This commit is contained in:
commit
e7ec59f31f
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue