Return [Article] from articlesForIndexes() instead of Set<Article>

This commit is contained in:
Nate Weaver
2022-04-17 15:26:37 -05:00
parent e1a6455af5
commit ae09d52940
2 changed files with 4 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
var showsSearchResults = false
var selectedArticles: [Article] {
return Array(articles.articlesForIndexes(tableView.selectedRowIndexes))
return articles.articlesForIndexes(tableView.selectedRowIndexes)
}
var hasAtLeastOneSelectedArticle: Bool {

View File

@@ -44,10 +44,10 @@ extension Array where Element == Article {
return nil
}
func articlesForIndexes(_ indexes: IndexSet) -> Set<Article> {
return Set(indexes.compactMap{ (oneIndex) -> Article? in
func articlesForIndexes(_ indexes: IndexSet) -> [Article] {
return indexes.compactMap{ (oneIndex) -> Article? in
return articleAtRow(oneIndex)
})
}
}
func sortedByDate(_ sortDirection: ComparisonResult, groupByFeed: Bool = false) -> ArticleArray {