Skip to content

Commit

Permalink
Fix reversed ordering on about page
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsRefsgaard committed Jul 25, 2023
1 parent 74ba9b5 commit a00246c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ui/pages/study_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class StudyPageState extends State<StudyPage> {
image: 'assets/images/kids.png',
);

// reverse the ordering of the messages
widget.model.messages.sort((a, b) => b.timestamp.compareTo(a.timestamp));

return Scaffold(
backgroundColor: Theme.of(context).colorScheme.secondary,
body: SafeArea(
Expand Down Expand Up @@ -50,7 +53,7 @@ class StudyPageState extends State<StudyPage> {
}

return _aboutStudyCard(
context, bloc.messages[index - 1]);
context, widget.model.messages[index - 1]);
},
),
);
Expand Down

0 comments on commit a00246c

Please sign in to comment.