Allow removing users from the invite dialog
This commit is contained in:
parent
e09af0b101
commit
b1c1274d96
3 changed files with 29 additions and 3 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue