|
|
@ -19,10 +19,12 @@ InviteesModel::addUser(QString mxid) |
|
|
|
beginInsertRows(QModelIndex(), invitees_.count(), invitees_.count()); |
|
|
|
beginInsertRows(QModelIndex(), invitees_.count(), invitees_.count()); |
|
|
|
|
|
|
|
|
|
|
|
auto invitee = new Invitee{mxid, this}; |
|
|
|
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); |
|
|
|
invitees_.push_back(invitee); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endInsertRows(); |
|
|
|
emit countChanged(); |
|
|
|
emit countChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|