[RoomList] Fix found algo

This commit is contained in:
Christian Pauly 2019-09-12 12:35:57 +02:00
parent 544e153c24
commit 61b052c647
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class RoomList {
for (j = 0; j < rooms.length; j++) {
if (rooms[j].id == chatUpdate.id) break;
}
final bool found = (j < rooms.length - 1 && rooms[j].id == chatUpdate.id);
final bool found = (j < rooms.length && rooms[j].id == chatUpdate.id);
final bool isLeftRoom = chatUpdate.membership == Membership.leave;
// Does the chat already exist in the list rooms?