mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-23 20:49:26 +01:00
Merge branch 'soru/unsupported-room-version' into 'master'
handle if lastEvent is null Closes #66 See merge request ChristianPauly/fluffychat-flutter!69
This commit is contained in:
commit
150fe64352
@ -184,16 +184,17 @@ class ChatListItem extends StatelessWidget {
|
||||
softWrap: false,
|
||||
)
|
||||
: Text(
|
||||
room.lastEvent.getLocalizedBody(
|
||||
L10n.of(context),
|
||||
withSenderNamePrefix: !room.isDirectChat,
|
||||
hideReply: true,
|
||||
),
|
||||
room.lastEvent?.getLocalizedBody(
|
||||
L10n.of(context),
|
||||
withSenderNamePrefix: !room.isDirectChat,
|
||||
hideReply: true,
|
||||
) ??
|
||||
'',
|
||||
softWrap: false,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.fade,
|
||||
style: TextStyle(
|
||||
decoration: room.lastEvent.redacted
|
||||
decoration: room.lastEvent?.redacted == true
|
||||
? TextDecoration.lineThrough
|
||||
: null,
|
||||
),
|
||||
|
@ -384,10 +384,11 @@ class _ChatListState extends State<ChatList> {
|
||||
var rooms = List<Room>.from(
|
||||
Matrix.of(context).client.rooms);
|
||||
rooms.removeWhere((Room room) =>
|
||||
searchMode &&
|
||||
!room.displayname.toLowerCase().contains(
|
||||
searchController.text.toLowerCase() ??
|
||||
''));
|
||||
room.lastEvent == null ||
|
||||
(searchMode &&
|
||||
!room.displayname.toLowerCase().contains(
|
||||
searchController.text.toLowerCase() ??
|
||||
'')));
|
||||
if (rooms.isEmpty &&
|
||||
(!searchMode ||
|
||||
publicRoomsResponse == null)) {
|
||||
|
Loading…
Reference in New Issue
Block a user