mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
Fix leaving rooms
This commit is contained in:
parent
f3d956aebc
commit
d307f24adf
2 changed files with 12 additions and 1 deletions
|
@ -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 a new issue