Hide rooms with custom defined types in quick switcher

This matches the behavior in other room lists. I also tried to normalize
the constructor with SortFilterRoomTreeModel.
This commit is contained in:
Joshua Goins
2026-02-10 20:11:48 -05:00
parent 115d4e7466
commit 847db41fb3
3 changed files with 15 additions and 4 deletions

View File

@@ -276,6 +276,11 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const
if (role == NotificationCountRole) {
return room->notificationCount();
}
if (role == RoomTypeRole) {
if (room->creation()) {
return room->creation()->contentPart<QString>("type"_L1);
}
}
return QVariant();
}
@@ -310,6 +315,7 @@ QHash<int, QByteArray> RoomListModel::roleNames() const
roles[IsChildSpaceRole] = "isChildSpace";
roles[IsDirectChat] = "isDirectChat";
roles[NotificationCountRole] = "notificationCount";
roles[RoomTypeRole] = "roomType";
return roles;
}