mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Don't add a user twice
This commit is contained in:
parent
b1c1274d96
commit
8830ce25d1
1 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,10 @@ InviteesModel::InviteesModel(QObject *parent)
|
|||
void
|
||||
InviteesModel::addUser(QString mxid)
|
||||
{
|
||||
for (const auto &invitee : invitees_)
|
||||
if (invitee->mxid_ == mxid)
|
||||
return;
|
||||
|
||||
beginInsertRows(QModelIndex(), invitees_.count(), invitees_.count());
|
||||
|
||||
auto invitee = new Invitee{mxid, this};
|
||||
|
|
Loading…
Reference in a new issue