From aff3a481475a91f01ef918665d14048092321737 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 f6748aa9f..c0aab6fcb 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,