Fix feed selection when the max feed score is 0.
This occurs, for example, when searching for “macrumors.com” and adding to the Feedbin account. All four feeds have a score of 0 since their source is set as HTMLLink. This would also fix a case in which there are two feeds: one with a negative score and one with a score of 0. Since the method uses a Set the feed selected when there are multiple feeds with an identical maximum score will be random.
This commit is contained in:
parent
ac9057299a
commit
0447694142
|
@ -46,7 +46,7 @@ struct FeedSpecifier: Hashable {
|
||||||
return feedSpecifiers.anyObject()
|
return feedSpecifiers.anyObject()
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentHighScore = 0
|
var currentHighScore = Int.min
|
||||||
var currentBestFeed: FeedSpecifier? = nil
|
var currentBestFeed: FeedSpecifier? = nil
|
||||||
|
|
||||||
for oneFeedSpecifier in feedSpecifiers {
|
for oneFeedSpecifier in feedSpecifiers {
|
||||||
|
|
Loading…
Reference in New Issue