Skip to content

Commit

Permalink
sort reviews to show latest ones first
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 committed Dec 13, 2024
1 parent 55ee71f commit 552e153
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/lib/pages/apps/app_detail/reviews_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class _ReviewsListPageState extends State<ReviewsListPage> {
@override
void initState() {
filteredReviews = widget.app.reviews;
filteredReviews.sort((a, b) => b.ratedAt.compareTo(a.ratedAt));
replyController = TextEditingController();
super.initState();
}
Expand All @@ -39,6 +40,7 @@ class _ReviewsListPageState extends State<ReviewsListPage> {
.toList();
});
}
filteredReviews.sort((a, b) => b.ratedAt.compareTo(a.ratedAt));
}

@override
Expand Down

0 comments on commit 552e153

Please sign in to comment.