Fix leaving rooms
This commit is contained in:
parent
f3d956aebc
commit
d307f24adf
@ -46,7 +46,7 @@ Page {
|
||||
states: [
|
||||
State {
|
||||
name: "highlight"
|
||||
when: hovered.hovered
|
||||
when: hovered.hovered && !(TimelineManager.timeline && model.roomId == TimelineManager.timeline.roomId())
|
||||
|
||||
PropertyChanges {
|
||||
target: roomItem
|
||||
|
@ -227,6 +227,17 @@ RoomlistModel::sync(const mtx::responses::Rooms &rooms)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &[room_id, room] : rooms.leave) {
|
||||
(void)room;
|
||||
auto idx = this->roomidToIndex(QString::fromStdString(room_id));
|
||||
if (idx != -1) {
|
||||
beginRemoveRows(QModelIndex(), idx, idx);
|
||||
roomids.erase(roomids.begin() + idx);
|
||||
models.remove(QString::fromStdString(room_id));
|
||||
endRemoveRows();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user