diff --git a/CHANGELOG.md b/CHANGELOG.md
index b88900f3..bdd4363c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,11 +2,16 @@
## [0.7.1] -- unreleased
+### Features
+
+- Show decrypted message source (helps debugging)
+
### Bugfixes
- Fix display of images sent by the user (thank you, wnereiz and not-chicken for reporting)
- Fix crash when trying to maximize image, that wasn't downloaded yet.
- Fix Binding restorMode flooding logs on Qt 5.14.2+
+- Fix with some qml styles hidden menu items leave empty space
## [0.7.0] -- 2020-04-19
diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts
index bd65e867..259b5c86 100644
--- a/resources/langs/nheko_de.ts
+++ b/resources/langs/nheko_de.ts
@@ -327,12 +327,12 @@
<translation>REGISTRIEREN</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation>Keine unterstützten Registrierungsmethoden!</translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Ungültiger Benutzername</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- Entschlüsselungsfehler (Fehler bei Kommunikation mit Datenbank) --</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation>-- Entschlüsselungsfehler (Fehler bei Suche nach megolm Schlüsseln in Datenbank) --</translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation>-- Entschlüsselungsfehler (%1) --</translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>Nachricht zurückziehen fehlgeschlagen: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation>Bild speichern</translation>
</message>
@@ -514,19 +514,19 @@
<translation>Datei speichern</translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation>-- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) --</translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation>-- Verschlüsseltes Event (Unbekannter Eventtyp) --</translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation>Antworten</translation>
</message>
@@ -694,7 +694,12 @@
<message>
<location line="+3"/>
<source>View raw message</source>
- <translation type="unfinished">Zeige rohen Nachrichteninhalt</translation>
+ <translation>Zeige rohen Nachrichteninhalt</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation>Zeige rohen, entschlüsselten Nachrichteninhalt</translation>
</message>
<message>
<location line="+4"/>
@@ -702,7 +707,7 @@
<translation>Nachricht löschen</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation>Speichern unter...</translation>
</message>
diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts
index 1a7889d5..4ce7e6e4 100644
--- a/resources/langs/nheko_el.ts
+++ b/resources/langs/nheko_el.ts
@@ -327,12 +327,12 @@
<translation>ΕΓΓΡΑΦΗ</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Μη έγκυρο όνομα χρήστη</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Αποθήκευση Εικόνας</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -697,12 +697,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts
index f75068fa..f7b3b093 100644
--- a/resources/langs/nheko_en.ts
+++ b/resources/langs/nheko_en.ts
@@ -327,12 +327,12 @@
<translation>REGISTER</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation>No supported registration flows!</translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Invalid username</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- Decryption Error (failed to communicate with DB) --</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation>-- Decryption Error (failed to retrieve megolm keys from db) --</translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation>-- Decryption Error (%1) --</translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>Message redaction failed: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation>Save image</translation>
</message>
@@ -514,19 +514,19 @@
<translation>Save file</translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation>-- Encrypted Event (No keys found for decryption) --</translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation>-- Encrypted Event (Unknown event type) --</translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation>Reply</translation>
</message>
@@ -697,12 +697,17 @@
<translation>View raw message</translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation>Redact message</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation>Save as</translation>
</message>
diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts
index b7230f63..eab4771b 100644
--- a/resources/langs/nheko_fi.ts
+++ b/resources/langs/nheko_fi.ts
@@ -327,12 +327,12 @@
<translation>REKISTERÖIDY</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Epäkelpo käyttäjänimi</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (tietokannan kanssa kommunikointi epäonnistui) --</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (megolm-avaimien hakeminen tietokannasta epäonnistui) --</translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished">-- Virhe purkaessa salausta (%1) --</translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Viestin poisto epäonnistui: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Tallenna kuva</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished">-- Salattu viesti (salauksen purkuavaimia ei löydetty) --</translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished">-- Salattu viesti (tuntematon viestityyppi) --</translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -697,12 +697,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts
index 0ea3540f..472f8c7f 100644
--- a/resources/langs/nheko_fr.ts
+++ b/resources/langs/nheko_fr.ts
@@ -328,12 +328,12 @@
<translation>S'ENREGISTRER</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Nom d'utilisateur invalide</translation>
</message>
@@ -472,30 +472,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Enregistrer l'image</translation>
</message>
@@ -515,19 +515,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -698,12 +698,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts
index dc8d4b03..d3194b42 100644
--- a/resources/langs/nheko_ja.ts
+++ b/resources/langs/nheko_ja.ts
@@ -327,12 +327,12 @@
<translation>登録</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>無効なユーザー名です</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation>-- 復号エラー (データベースと通信できませんでした) --</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation>-- 復号エラー (データベースからmegolm鍵を取得できませんでした) --</translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished">-- 復号エラー (%1) --</translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation>メッセージを編集できませんでした: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation>画像を保存</translation>
</message>
@@ -514,19 +514,19 @@
<translation>ファイルを保存</translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished">-- 暗号化イベント (復号鍵が見つかりません) --</translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished">-- 暗号化イベント (不明なイベント型です) --</translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation>
@@ -676,7 +676,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished">返信</translation>
</message>
@@ -696,12 +696,17 @@
<translation>ソースを見る</translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation>メッセージを編集</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation>名前を付けて保存</translation>
</message>
diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts
index cfd01d2f..cb4f68e8 100644
--- a/resources/langs/nheko_nl.ts
+++ b/resources/langs/nheko_nl.ts
@@ -327,12 +327,12 @@
<translation>REGISTREREN</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Ongeldige gebruikersnaam</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Afbeelding opslaan</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -677,7 +677,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -697,12 +697,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts
index 11183d23..9fb3bae6 100644
--- a/resources/langs/nheko_pl.ts
+++ b/resources/langs/nheko_pl.ts
@@ -327,12 +327,12 @@
<translation>ZAREJESTRUJ</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Nieprawidłowa nazwa użytkownika</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Redagowanie wiadomości nie powiodło się: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Zapisz obraz</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -698,12 +698,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts
index 0facf794..f48fccf3 100644
--- a/resources/langs/nheko_ru.ts
+++ b/resources/langs/nheko_ru.ts
@@ -327,12 +327,12 @@
<translation>РЕГИСТРАЦИЯ</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>Некорректное имя пользователя</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">Ошибка редактирования сообщения: %1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">Сохранить изображение</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -678,7 +678,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -698,12 +698,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts
index aa300707..63b67734 100644
--- a/resources/langs/nheko_zh_CN.ts
+++ b/resources/langs/nheko_zh_CN.ts
@@ -327,12 +327,12 @@
<translation>注册</translation>
</message>
<message>
- <location line="+54"/>
+ <location line="+55"/>
<source>No supported registration flows!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+132"/>
+ <location line="+135"/>
<source>Invalid username</source>
<translation>无效的用户名</translation>
</message>
@@ -471,30 +471,30 @@
<context>
<name>TimelineModel</name>
<message>
- <location filename="../../src/timeline/TimelineModel.cpp" line="+733"/>
+ <location filename="../../src/timeline/TimelineModel.cpp" line="+754"/>
<source>-- Decryption Error (failed to communicate with DB) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed when trying to lookup the session.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<source>-- Decryption Error (failed to retrieve megolm keys from db) --</source>
<comment>Placeholder, when the message can't be decrypted, because the DB access failed.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+13"/>
<source>-- Decryption Error (%1) --</source>
<comment>Placeholder, when the message can't be decrypted. In this case, the Olm decrytion returned an error, which is passed ad %1.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+85"/>
+ <location line="+89"/>
<source>Message redaction failed: %1</source>
<translation type="unfinished">删除消息失败:%1</translation>
</message>
<message>
- <location line="+454"/>
+ <location line="+455"/>
<source>Save image</source>
<translation type="unfinished">保存图像</translation>
</message>
@@ -514,19 +514,19 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-591"/>
+ <location line="-600"/>
<source>-- Encrypted Event (No keys found for decryption) --</source>
<comment>Placeholder, when the message was not decrypted yet or can't be decrypted.</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+75"/>
+ <location line="+82"/>
<source>-- Encrypted Event (Unknown event type) --</source>
<comment>Placeholder, when the message was decrypted, but we couldn't parse it, because Nheko/mtxclient don't support that event type yet.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+648"/>
+ <location line="+650"/>
<source>%1 and %2 are typing.</source>
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
<translation type="unfinished">
@@ -676,7 +676,7 @@
<context>
<name>TimelineView</name>
<message>
- <location filename="../qml/TimelineView.qml" line="+46"/>
+ <location filename="../qml/TimelineView.qml" line="+48"/>
<source>Reply</source>
<translation type="unfinished"></translation>
</message>
@@ -696,12 +696,17 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
+ <source>View decrypted raw message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+4"/>
<source>Redact message</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>Save as</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index e13cde28..05c69112 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -17,11 +17,11 @@ MouseArea {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if (mouse.button === Qt.RightButton)
- messageContextMenu.show(model.id, model.type, row)
+ messageContextMenu.show(model.id, model.type, model.isEncrypted, row)
}
onPressAndHold: {
if (mouse.source === Qt.MouseEventNotSynthesized)
- messageContextMenu.show(model.id, model.type, row)
+ messageContextMenu.show(model.id, model.type, model.isEncrypted, row)
}
RowLayout {
@@ -97,8 +97,7 @@ MouseArea {
ToolTip.visible: hovered
ToolTip.text: qsTr("Options")
- onClicked: messageContextMenu.show(model.id, model.type, optionsButton)
-
+ onClicked: messageContextMenu.show(model.id, model.type, model.isEncrypted, optionsButton)
}
Label {
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 86b511b2..cad341b5 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -33,14 +33,16 @@ Page {
id: messageContextMenu
modal: true
- function show(eventId_, eventType_, showAt) {
+ function show(eventId_, eventType_, isEncrypted_, showAt) {
eventId = eventId_
eventType = eventType_
+ isEncrypted = isEncrypted_
popup(showAt)
}
property string eventId
property int eventType
+ property bool isEncrypted
MenuItem {
text: qsTr("Reply")
@@ -58,11 +60,18 @@ Page {
onTriggered: chat.model.viewRawMessage(messageContextMenu.eventId)
}
MenuItem {
+ visible: messageContextMenu.isEncrypted
+ height: visible ? implicitHeight : 0
+ text: qsTr("View decrypted raw message")
+ onTriggered: chat.model.viewDecryptedRawMessage(messageContextMenu.eventId)
+ }
+ MenuItem {
text: qsTr("Redact message")
onTriggered: chat.model.redactEvent(messageContextMenu.eventId)
}
MenuItem {
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
+ height: visible ? implicitHeight : 0
text: qsTr("Save as")
onTriggered: timelineManager.timeline.saveMedia(messageContextMenu.eventId)
}
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 7e124f47..bb793945 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -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_);
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index bb84bcd8..84e9ec26 100644
--- a/src/timeline/TimelineModel.h
+++ b/src/timeline/TimelineModel.h
@@ -179,6 +179,7 @@ public:
Q_INVOKABLE QString escapeEmoji(QString str) const;
Q_INVOKABLE void viewRawMessage(QString id) const;
+ Q_INVOKABLE void viewDecryptedRawMessage(QString id) const;
Q_INVOKABLE void openUserProfile(QString userid) const;
Q_INVOKABLE void replyAction(QString id);
Q_INVOKABLE void readReceiptsAction(QString id) const;
|