Fix #141.
This commit is contained in:
parent
b5d51ebbf2
commit
588c23ebdc
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue