Allow removing users from the invite dialog

This commit is contained in:
Loren Burkholder 2021-11-13 15:05:26 -05:00
parent e09af0b101
commit b1c1274d96
3 changed files with 29 additions and 3 deletions

View file

@ -30,6 +30,20 @@ InviteesModel::addUser(QString mxid)
emit countChanged();
}
void
InviteesModel::removeUser(QString mxid)
{
for (int i = 0; i < invitees_.length(); ++i) {
if (invitees_[i]->mxid_ == mxid) {
beginRemoveRows(QModelIndex(), i, i);
invitees_.removeAt(i);
endRemoveRows();
emit countChanged();
break;
}
}
}
QHash<int, QByteArray>
InviteesModel::roleNames() const
{