Add join room page

This commit is contained in:
Carl Schwan
2020-11-10 17:08:13 +00:00
parent 9de51fc77e
commit b0700726f9
11 changed files with 244 additions and 303 deletions

View File

@@ -177,6 +177,12 @@ QVariant PublicRoomListModel::data(const QModelIndex &index, int role) const
if (role == RoomIDRole) {
return room.roomId;
}
if (role == AliasRole) {
if (!room.canonicalAlias.isEmpty()) {
return room.canonicalAlias;
}
return {};
}
if (role == MemberCountRole) {
return room.numJoinedMembers;
}
@@ -208,6 +214,7 @@ QHash<int, QByteArray> PublicRoomListModel::roleNames() const
roles[AllowGuestsRole] = "allowGuests";
roles[WorldReadableRole] = "worldReadable";
roles[IsJoinedRole] = "isJoined";
roles[AliasRole] = "alias";
return roles;
}