This commit is contained in:
Black Hat 2019-05-10 19:26:35 +08:00
parent b5d51ebbf2
commit 588c23ebdc
1 changed files with 4 additions and 2 deletions

View File

@ -46,8 +46,10 @@ void RoomListModel::setConnection(Connection* connection) {
connect(connection, &Connection::directChatsListChanged, this, connect(connection, &Connection::directChatsListChanged, this,
[=](Connection::DirectChatsMap additions, [=](Connection::DirectChatsMap additions,
Connection::DirectChatsMap removals) { Connection::DirectChatsMap removals) {
for (QString roomID : additions.values() + removals.values()) for (QString roomID : additions.values() + removals.values()) {
refresh(static_cast<SpectralRoom*>(connection->room(roomID))); auto room = connection->room(roomID);
if (room) refresh(static_cast<SpectralRoom*>(room));
}
}); });
doResetModel(); doResetModel();