Skip to content

Commit

Permalink
Update matrix_direct_messages_component.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
Airyzz committed Jun 28, 2024
1 parent dbac253 commit 4a0b79e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class MatrixDirectMessagesComponent
void postLoginInit() {
updateRoomsList();
client.onRoomAdded.listen(onRoomAdded);
client.onRoomRemoved.listen(onRoomRemoved);
}

@override
Expand Down Expand Up @@ -110,4 +111,10 @@ class MatrixDirectMessagesComponent
updateRoomsList();
}
}

void onRoomRemoved(int index) {
var room = client.rooms[index];
directMessageRooms.remove(room);
listUpdated.add(null);
}
}

0 comments on commit 4a0b79e

Please sign in to comment.