From b62149fdb0b5c247c075a1070bf4b75c1a3d057e Mon Sep 17 00:00:00 2001 From: Josip Delic Date: Fri, 1 Sep 2017 20:59:15 +0200 Subject: Add Connection::leftRoom signal --- connection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'connection.cpp') diff --git a/connection.cpp b/connection.cpp index f9f1490c..7920125d 100644 --- a/connection.cpp +++ b/connection.cpp @@ -207,7 +207,10 @@ JoinRoomJob* Connection::joinRoom(const QString& roomAlias) void Connection::leaveRoom(Room* room) { - callApi(room->id()); + auto job = callApi(room->id()); + connect( job, &BaseJob::success, [=] () { + emit leftRoom(room); + }); } RoomMessagesJob* Connection::getMessages(Room* room, const QString& from) const -- cgit v1.2.3