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 a00246c commit 56cd742
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions lib/ui/pages/study_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ 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
2 changes: 1 addition & 1 deletion lib/view_models/study_page_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class StudyPageViewModel extends ViewModel {
Stream<int> get messageStream => bloc.messageStream;

/// The list of messages to be displayed.
List<Message> get messages => bloc.messages;
List<Message> get messages => bloc.messages.reversed.toList();

/// The icon for a type of message
Icon getMessageTypeIcon(MessageType type) {
Expand Down

0 comments on commit 56cd742

Please sign in to comment.