Fix completer switching between rooms with html in their roomid
This commit is contained in:
parent
f25c68d439
commit
1e2dce4678
3 changed files with 5 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ Control {
|
|||
}
|
||||
function finishCompletion() {
|
||||
if (popup.completerName == "room")
|
||||
popup.completionSelected(listView.itemAtIndex(currentIndex).modelData.roomid);
|
||||
popup.completionSelected(listView.itemAtIndex(currentIndex).modelData.rawroomid);
|
||||
else if (popup.completerName == "user")
|
||||
popup.completionSelected(listView.itemAtIndex(currentIndex).modelData.userid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ RoomsModel::roleNames() const
|
|||
{Roles::RoomAlias, "roomAlias"},
|
||||
{Roles::AvatarUrl, "avatarUrl"},
|
||||
{Roles::RoomID, "roomid"},
|
||||
{Roles::RawRoomID, "rawroomid"},
|
||||
{Roles::RoomName, "roomName"},
|
||||
{Roles::IsTombstoned, "isTombstoned"},
|
||||
{Roles::IsSpace, "isSpace"},
|
||||
|
|
@ -68,6 +69,8 @@ RoomsModel::data(const QModelIndex &index, int role) const
|
|||
cache::client()->singleRoomInfo(rooms[index.row()].id).avatar_url);
|
||||
case Roles::RoomID:
|
||||
return QString::fromStdString(rooms[index.row()].id).toHtmlEscaped();
|
||||
case Roles::RawRoomID:
|
||||
return QString::fromStdString(rooms[index.row()].id);
|
||||
case Roles::IsTombstoned:
|
||||
return rooms[index.row()].is_tombstoned;
|
||||
case Roles::IsSpace:
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public:
|
|||
AvatarUrl = Qt::UserRole,
|
||||
RoomAlias,
|
||||
RoomID,
|
||||
RawRoomID,
|
||||
RoomName,
|
||||
IsTombstoned,
|
||||
IsSpace,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue