Merge branch 'mac-candidate' into main

This commit is contained in:
Maurice Parker 2020-08-06 17:06:49 -05:00
commit a7a17e3937
1 changed files with 4 additions and 0 deletions

View File

@ -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)
}