mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user