summary refs log tree commit diff
path: root/src/UsersModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-24 19:06:31 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 19:05:12 +0100
commit37df79f7964795e03ffca10c4623cb9061aa3b9c (patch)
tree50b35c3ab5d018564b33e76aba2bd5c89abc77b6 /src/UsersModel.cpp
parentLinkify username completion (diff)
downloadnheko-37df79f7964795e03ffca10c4623cb9061aa3b9c.tar.xz
Show userid in completer
Diffstat (limited to 'src/UsersModel.cpp')
-rw-r--r--src/UsersModel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/UsersModel.cpp b/src/UsersModel.cpp
index aeabf467..4be37503 100644
--- a/src/UsersModel.cpp
+++ b/src/UsersModel.cpp
@@ -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 {};