Skip to content

Commit

Permalink
fix sorting (for real)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksh-b committed Jun 21, 2024
1 parent c42aa32 commit ecd1158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/brain/article_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ArticleProvider {
await Future.wait(futures);
}
newsArticles.addAll(subscriptionArticles);
newsArticles.toList().sort((a, b) => b.publishedAt.compareTo(a.publishedAt));
newsArticles = (newsArticles.toList()..sort((a, b) => b.publishedAt.compareTo(a.publishedAt))).toSet();
return newsArticles.toList();
}

Expand Down

0 comments on commit ecd1158

Please sign in to comment.