From 563a67eabdf6136ef4e7546972cb057d6cde767d Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Thu, 11 Nov 2021 18:05:12 +0100 Subject: [PATCH] fix: Crash when there is no prev message --- lib/pages/chat_list/chat_list_item.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index f6748aa9..c0aab6fc 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -270,11 +270,12 @@ class ChatListItem extends StatelessWidget { room.membership == Membership.invite ? L10n.of(context).youAreInvitedToThisChat : room.lastEvent?.getLocalizedBody( - MatrixLocals(L10n.of(context)), - hideReply: true, - hideEdit: true, - plaintextBody: true, - ), + MatrixLocals(L10n.of(context)), + hideReply: true, + hideEdit: true, + plaintextBody: true, + ) ?? + L10n.of(context).emptyChat, softWrap: false, maxLines: 1, overflow: TextOverflow.ellipsis,