From e8d25e37a27450911025683e87f7aea680fc5082 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 6 Sep 2018 07:38:32 -0500 Subject: [PATCH] Fixed so that only older articles are marked as read, not the currently selected article(s). Issue #432 --- .../MainWindow/Timeline/TimelineViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NetNewsWire/MainWindow/Timeline/TimelineViewController.swift b/NetNewsWire/MainWindow/Timeline/TimelineViewController.swift index 467daf8d6..046cef10a 100644 --- a/NetNewsWire/MainWindow/Timeline/TimelineViewController.swift +++ b/NetNewsWire/MainWindow/Timeline/TimelineViewController.swift @@ -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 }