mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Don't notify the delegate of a selected article change if they haven't actually changed
This commit is contained in:
1 parent
ca2fcfbc9b
commit
7baebfeb6a
1 file changed
+4
@@ -164,6 +164,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
|
||||
}
|
||||
}
|
||||
|
||||
private var previouslySelectedArticles: ArticleArray?
|
||||
|
||||
private var oneSelectedArticle: Article? {
|
||||
return selectedArticles.count == 1 ? selectedArticles.first : nil
|
||||
}
|
||||
@@ -816,6 +818,8 @@ extension TimelineViewController: NSTableViewDelegate {
|
||||
}
|
||||
|
||||
private func selectionDidChange(_ selectedArticles: ArticleArray?) {
|
||||
guard selectedArticles != previouslySelectedArticles else { return }
|
||||
previouslySelectedArticles = selectedArticles
|
||||
delegate?.timelineSelectionDidChange(self, selectedArticles: selectedArticles)
|
||||
delegate?.timelineInvalidatedRestorationState(self)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user