Fix leaving invites from the room context menu
This commit is contained in:
parent
57a15152d8
commit
d21090f872
1 changed files with 2 additions and 1 deletions
|
|
@ -702,6 +702,8 @@ RoomlistModel::declineInvite(QString roomid)
|
|||
void
|
||||
RoomlistModel::leave(QString roomid, QString reason)
|
||||
{
|
||||
// We want to leave in any case, even if this is an invite or similar.
|
||||
ChatPage::instance()->leaveRoom(roomid, reason);
|
||||
if (models.contains(roomid)) {
|
||||
auto idx = roomidToIndex(roomid);
|
||||
|
||||
|
|
@ -710,7 +712,6 @@ RoomlistModel::leave(QString roomid, QString reason)
|
|||
roomids.erase(roomids.begin() + idx);
|
||||
models.remove(roomid);
|
||||
endRemoveRows();
|
||||
ChatPage::instance()->leaveRoom(roomid, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue