Skip to content

Commit

Permalink
Merge pull request #222 from les-crepes/221-correction-dernier-message
Browse files Browse the repository at this point in the history
Fix ok
  • Loading branch information
chloefont authored Sep 7, 2022
2 parents 4927314 + ac7d039 commit 47dcca8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/provider/chat_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ChatProvider extends ChangeNotifier {
UnmodifiableListView<MapEntry<User, Message>> getLastMessageOfEachUser() {
final result =
_messages.entries.where((element) => element.value.isNotEmpty).map((e) {
MapEntry<User, Message> entry = MapEntry(e.key, e.value.last);
MapEntry<User, Message> entry = MapEntry(e.key, e.value.first);
return entry;
}).toList();
return UnmodifiableListView(result);
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/custom_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CustomList extends StatelessWidget {

@override
Widget build(BuildContext context) {
DateFormat format = DateFormat('d/m/yy');
DateFormat format = DateFormat('d/MM/yy');
return Column(
children: [
StraightTopBar(title: _title),
Expand Down

0 comments on commit 47dcca8

Please sign in to comment.