mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Insert user before loading avatar/display name
This commit is contained in:
parent
c78c284898
commit
77c636f3d3
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue