feat: add new plugin ui.rerenderFetchedEmails method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user