Insert user before loading avatar/display name

pull/595/head
Loren Burkholder 3 years ago
parent c78c284898
commit 77c636f3d3
  1. 4
      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();
}

Loading…
Cancel
Save