diff options
| author | saturneric <[email protected]> | 2026-10-22 20:18:37 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-10-22 20:18:37 +0200 |
| commit | 187a7405486e7f5cefb80aafc55d2bede107b4d6 (patch) | |
| tree | 114a72da36cac0072d8c039406fb8b92f29e264f /src | |
| parent | i18n(translations): update catalog source references (diff) | |
| download | modules-187a7405486e7f5cefb80aafc55d2bede107b4d6.tar.gz modules-187a7405486e7f5cefb80aafc55d2bede107b4d6.zip | |
feat(email): re-check open messages when key databases are reloaded
- handle KEY_DATABASES_RELOADED like a key database refresh
- declare the event in the module manifest
Diffstat (limited to 'src')
| -rw-r--r-- | src/m_email/EMailModule.cpp | 5 | ||||
| -rw-r--r-- | src/m_email/module.json | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/m_email/EMailModule.cpp b/src/m_email/EMailModule.cpp index 354dbc5..3cfd8b0 100644 --- a/src/m_email/EMailModule.cpp +++ b/src/m_email/EMailModule.cpp @@ -1760,7 +1760,7 @@ auto DoOpenImapController(const gf::cmd::CommandContext& /*ctx*/, // The module's whole framework surface. // The crypto operations stay events: the Host hands the module an e-mail // document's bytes and takes the result back, which is data, not UI. -constexpr std::array<GFEventBinding, 7> kEvents = {{ +constexpr std::array<GFEventBinding, 8> kEvents = {{ {"EDIT_TAB_TYPE_EMAIL_OP_DECRYPT", &OnEditTabTypeEmailOpDecrypt}, {"EDIT_TAB_TYPE_EMAIL_OP_DECRYPT_VERIFY", &OnEditTabTypeEmailOpDecryptVerify}, @@ -1769,6 +1769,9 @@ constexpr std::array<GFEventBinding, 7> kEvents = {{ {"EDIT_TAB_TYPE_EMAIL_OP_SIGN", &OnEditTabTypeEmailOpSign}, {"EDIT_TAB_TYPE_EMAIL_OP_VERIFY", &OnEditTabTypeEmailOpVerify}, {"KEY_DATABASE_REFRESH_DONE", &OnKeyDatabaseRefreshDone}, + // A new set of key databases is a new keyring as far as an open message + // is concerned: its verdict is worked out again against the one in use. + {"KEY_DATABASES_RELOADED", &OnKeyDatabaseRefreshDone}, }}; const std::array<gf::cmd::Binding, 2> kCommands = { diff --git a/src/m_email/module.json b/src/m_email/module.json index 8dc63c3..baf5297 100644 --- a/src/m_email/module.json +++ b/src/m_email/module.json @@ -19,7 +19,8 @@ "EDIT_TAB_TYPE_EMAIL_OP_ENCRYPT_SIGN", "EDIT_TAB_TYPE_EMAIL_OP_SIGN", "EDIT_TAB_TYPE_EMAIL_OP_VERIFY", - "KEY_DATABASE_REFRESH_DONE" + "KEY_DATABASE_REFRESH_DONE", + "KEY_DATABASES_RELOADED" ], "commands": [ "com.bktus.gpgfrontend.module.email.new_message", |
