Move NeoChatRoom::showMessage to Controller
It doesn't fit into NeoChatRoom conceptually
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "chatbarcache.h"
|
||||
#include "clipboard.h"
|
||||
#include "controller.h"
|
||||
#include "eventhandler.h"
|
||||
#include "events/joinrulesevent.h"
|
||||
#include "events/pollevent.h"
|
||||
@@ -1346,10 +1347,9 @@ void NeoChatRoom::updatePushNotificationState(QString type)
|
||||
void NeoChatRoom::reportEvent(const QString &eventId, const QString &reason)
|
||||
{
|
||||
auto job = connection()->callApi<ReportContentJob>(id(), eventId, -50, reason);
|
||||
connect(job, &BaseJob::finished, this, [this, job]() {
|
||||
connect(job, &BaseJob::finished, this, [job]() {
|
||||
if (job->error() == BaseJob::Success) {
|
||||
Q_EMIT showMessage(Positive, i18n("Report sent successfully."));
|
||||
Q_EMIT showMessage(MessageType::Positive, i18n("Report sent successfully."));
|
||||
Q_EMIT Controller::instance().showMessage(Controller::Positive, i18n("Report sent successfully."));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user