summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-08-01 10:51:21 +0000
committerGitHub <noreply@github.com>2021-08-01 10:51:21 +0000
commit619525e62f55ca683b4a8be7a8868bc42d7edc4e (patch)
treed6f9ca51c9ad043ff58a6dac3cebd14aeecaaf8e /src/timeline/TimelineModel.cpp
parentAdd option to only send encrypted messages to verified devices (diff)
parentFix colors for manual dark theme (diff)
downloadnheko-619525e62f55ca683b4a8be7a8868bc42d7edc4e.tar.xz
Merge pull request #662 from LorenDB/qml-all-the-things
QML all the things, part 3: Raw message dialog
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 6ae0c4d1..a8adf05b 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -31,7 +31,6 @@ #include "ReadReceiptsModel.h" #include "TimelineViewManager.h" #include "Utils.h" -#include "dialogs/RawMessage.h" Q_DECLARE_METATYPE(QModelIndex) @@ -1026,14 +1025,13 @@ TimelineModel::formatDateSeparator(QDate date) const } void -TimelineModel::viewRawMessage(QString id) const +TimelineModel::viewRawMessage(QString id) { auto e = events.get(id.toStdString(), "", false); if (!e) return; std::string ev = mtx::accessors::serialize_event(*e).dump(4); - auto dialog = new dialogs::RawMessage(QString::fromStdString(ev)); - Q_UNUSED(dialog); + emit showRawMessageDialog(QString::fromStdString(ev)); } void @@ -1047,15 +1045,14 @@ TimelineModel::forwardMessage(QString eventId, QString roomId) } void -TimelineModel::viewDecryptedRawMessage(QString id) const +TimelineModel::viewDecryptedRawMessage(QString id) { auto e = events.get(id.toStdString(), ""); if (!e) return; std::string ev = mtx::accessors::serialize_event(*e).dump(4); - auto dialog = new dialogs::RawMessage(QString::fromStdString(ev)); - Q_UNUSED(dialog); + emit showRawMessageDialog(QString::fromStdString(ev)); } void