Merge pull request #436 from vincode-io/master

Fixed so that only older articles are marked as read, not the current…
This commit is contained in:
Brent Simmons
2018-09-06 13:12:12 -07:00
committed by GitHub

View File

@@ -249,14 +249,14 @@ class TimelineViewController: NSViewController, UndoableCommandRunner {
}
func markOlderArticlesRead(_ selectedArticles: [Article]) {
// Mark articles the same age or older than the selectedArticles(s) as read.
// Mark articles older than the selectedArticles(s) as read.
var cutoffDate: Date? = nil
for article in selectedArticles {
if cutoffDate == nil {
cutoffDate = article.logicalDatePublished
}
else if cutoffDate! < article.logicalDatePublished {
else if cutoffDate! > article.logicalDatePublished {
cutoffDate = article.logicalDatePublished
}
}
@@ -264,7 +264,7 @@ class TimelineViewController: NSViewController, UndoableCommandRunner {
return
}
let articlesToMark = articles.filter { $0.logicalDatePublished <= cutoffDate! }
let articlesToMark = articles.filter { $0.logicalDatePublished < cutoffDate! }
if articlesToMark.isEmpty {
return
}