Fixed so that only older articles are marked as read, not the currently selected article(s). Issue #432
This commit is contained in:
parent
26cca9e6e9
commit
e8d25e37a2
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue