diff options
-rw-r--r-- | connection.cpp | 3 | ||||
-rw-r--r-- | connection.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/connection.cpp b/connection.cpp index 749d2062..84a52149 100644 --- a/connection.cpp +++ b/connection.cpp @@ -237,7 +237,7 @@ MediaThumbnailJob* Connection::getThumbnail(const QUrl& url, int requestedWidth, return getThumbnail(url, QSize(requestedWidth, requestedHeight)); } -ForgetRoomJob* Connection::forgetRoom(const QString& id) const +ForgetRoomJob* Connection::forgetRoom(const QString& id) { // To forget is hard :) First we should ensure the local user is not // in the room (by leaving it, if necessary); once it's done, the /forget @@ -265,6 +265,7 @@ ForgetRoomJob* Connection::forgetRoom(const QString& id) const for (auto f: {false, true}) if (auto r = d->roomMap.take({ id, f })) { + emit aboutToDeleteRoom(r); qCDebug(MAIN) << "Room" << id << "in join state" << toCString(r->joinState()) << "will be deleted"; diff --git a/connection.h b/connection.h index 4afae08f..b7d049f1 100644 --- a/connection.h +++ b/connection.h @@ -107,7 +107,7 @@ namespace QMatrixClient * of a respective room so by the moment this finishes, there might be no * Room object anymore. */ - ForgetRoomJob* forgetRoom(const QString& id) const; + ForgetRoomJob* forgetRoom(const QString& id); Q_INVOKABLE QUrl homeserver() const; Q_INVOKABLE User* user(const QString& userId); |