feat: add new plugin ui.rerenderFetchedEmails method

This commit is contained in:
Paulhenry Saux
2026-07-22 13:39:21 +02:00
parent 0e47c3b039
commit 07c473e057
4 changed files with 22 additions and 1 deletions
+8
View File
@@ -63,6 +63,7 @@ const PERM_PER_METHOD: Record<string, Permission | null> = {
'ui.alert': null,
'ui.prompt': null,
'ui.rerenderEmail': null,
'ui.rerenderFetchedEmails': null,
'ui.openExternalUrl': null,
'ui.downloadFile': 'ui:download-file'
};
@@ -653,6 +654,13 @@ export async function dispatchApiCall(
window.dispatchEvent(new CustomEvent('plugin:rerender-email'));
return undefined;
}
case 'ui.rerenderFetchedEmails': {
// Re-run the onEmailsFetched hook for the currently shown message list.
// Used by crypto plugins after they change decryption state s
// so the preview or others properties re-decrypts without a full reload.
window.dispatchEvent(new CustomEvent('plugin:rerender-fetched-emails'));
return undefined;
}
case 'ui.openExternalUrl': {
const url = String(args[0] ?? '');
// Only http(s) - the sandbox should not be able to navigate the host