Remove room from RoomTreeModel before leaving it
This makes sure that the room disappears from the tree view
This commit is contained in:
@@ -46,6 +46,7 @@ void RoomTreeModel::setConnection(NeoChatConnection *connection)
|
||||
endResetModel();
|
||||
connect(connection, &Connection::newRoom, this, &RoomTreeModel::newRoom);
|
||||
connect(connection, &Connection::leftRoom, this, &RoomTreeModel::leftRoom);
|
||||
connect(connection, &Connection::aboutToDeleteRoom, this, &RoomTreeModel::leftRoom);
|
||||
|
||||
for (const auto &room : m_connection->allRooms()) {
|
||||
newRoom(dynamic_cast<NeoChatRoom *>(room));
|
||||
|
||||
Reference in New Issue
Block a user