handle if lastEvent is null
This commit is contained in:
parent
677134d7d2
commit
dedda459c9
2 changed files with 12 additions and 10 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue