diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-10-05 23:37:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-10-05 23:37:52 +0200 |
commit | f0a020814794a14760d5aa90493117ea3667e61f (patch) | |
tree | 31f60164115580f692fcf7761e6de8acca3bc6ee /plugins | |
parent | 3e15996dac725dead8d3d7e017f060e15edbd1a6 (diff) |
Only decrypt gpg message in room list if its the latest message
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 6cc3668..68081d8 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -59,7 +59,7 @@ namespace QuickMedia { DECRYPTED }; - MatrixChatBodyItemData(Matrix *matrix, std::string text_to_decrypt) : matrix(matrix), text_to_decrypt(std::move(text_to_decrypt)) {} + MatrixChatBodyItemData(Matrix *matrix, std::string text_to_decrypt, RoomData *room = nullptr, uint64_t gpg_decrypt_message_id = 0) : matrix(matrix), text_to_decrypt(std::move(text_to_decrypt)), room(room), gpg_decrypt_message_id(gpg_decrypt_message_id) {} ~MatrixChatBodyItemData(); void draw_overlay(mgl::Window&, const Widgets &widgets) override; @@ -67,6 +67,8 @@ namespace QuickMedia { std::shared_ptr<MatrixChatBodyDecryptJob> decrypt_job; Matrix *matrix = nullptr; std::string text_to_decrypt; + RoomData *room = nullptr; + uint64_t gpg_decrypt_message_id = 0; }; // TODO: Remove. Not needed anymore. @@ -235,6 +237,7 @@ namespace QuickMedia { int notification_power_level = 50; size_t index = 0; + std::atomic<uint64_t> gpg_decrypt_message_id = 0; private: std::mutex user_mutex; std::recursive_mutex room_mutex; |