Fix leaving invites from the room context menu

This commit is contained in:
Nicolas Werner 2025-05-23 10:45:34 +02:00
parent 57a15152d8
commit d21090f872
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -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);
}
}
}