summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-07-20 19:20:55 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-07-20 21:48:10 -0400
commit77c636f3d3f0bc11c2fc5e6cc90ee58bd42ab5f9 (patch)
tree14d40357435faaf12f75e8c2b75bd02a93dc7580 /src
parentCall the correct function (diff)
downloadnheko-77c636f3d3f0bc11c2fc5e6cc90ee58bd42ab5f9.tar.xz
Insert user before loading avatar/display name
Diffstat (limited to 'src')
-rw-r--r--src/InviteesModel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/InviteesModel.cpp b/src/InviteesModel.cpp

index 9b64f57c..7bc2b2d4 100644 --- a/src/InviteesModel.cpp +++ b/src/InviteesModel.cpp
@@ -19,10 +19,12 @@ InviteesModel::addUser(QString mxid) beginInsertRows(QModelIndex(), invitees_.count(), invitees_.count()); auto invitee = new Invitee{mxid, this}; - connect(invitee, &Invitee::userInfoLoaded, this, [this]() { endInsertRows(); }); + auto indexOfInvitee = invitees_.count(); + connect(invitee, &Invitee::userInfoLoaded, this, [this, indexOfInvitee]() { emit dataChanged(index(indexOfInvitee), index(indexOfInvitee)); }); invitees_.push_back(invitee); + endInsertRows(); emit countChanged(); }