Add menu entry to show decrypted source

Also make hidden entries not consume space in Menus with some qml
styles.
This commit is contained in:
Nicolas Werner 2020-04-21 22:32:45 +02:00
parent 69c8476cb7
commit 0e1bb5137b
15 changed files with 203 additions and 126 deletions

View file

@ -697,7 +697,20 @@ TimelineModel::viewRawMessage(QString id) const
}
void
TimelineModel::viewDecryptedRawMessage(QString id) const
{
auto event = events.value(id);
if (auto e =
std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(&event)) {
event = decryptEvent(*e).event;
}
std::string ev = utils::serialize_event(event).dump(4);
auto dialog = new dialogs::RawMessage(QString::fromStdString(ev));
Q_UNUSED(dialog);
}
void
TimelineModel::openUserProfile(QString userid) const
{
MainWindow::instance()->openUserProfile(userid, room_id_);