Skip to content
Snippets Groups Projects
Commit 37df79f7 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Show userid in completer

parent c07c3261
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,11 @@ Popup {
color: model.index == popup.currentIndex ? colors.highlightedText : colors.text
}
Label {
text: "(" + model.userid + ")"
color: model.index == popup.currentIndex ? colors.highlightedText : colors.buttonText
}
}
}
......
......@@ -23,6 +23,7 @@ UsersModel::roleNames() const
{CompletionModel::SearchRole2, "searchRole2"},
{Roles::DisplayName, "displayName"},
{Roles::AvatarUrl, "avatarUrl"},
{Roles::UserID, "userid"},
};
}
......@@ -44,6 +45,8 @@ UsersModel::data(const QModelIndex &index, int role) const
case Roles::AvatarUrl:
return cache::avatarUrl(QString::fromStdString(room_id),
QString::fromStdString(roomMembers_[index.row()]));
case Roles::UserID:
return userids[index.row()];
}
}
return {};
......
......@@ -9,6 +9,7 @@ public:
{
AvatarUrl = Qt::UserRole,
DisplayName,
UserID,
};
UsersModel(const std::string &roomId, QObject *parent = nullptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment