Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5830 Move deleteExpired logic to messageRenderer and perform once per minute instead of every seconds #5840

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions extension/js/common/message-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export class MessageRenderer {
private debug = false
) {
this.downloader = new Downloader(gmail);
// Check expired messages every minute and delete them
Catch.setHandledInterval(() => {
this.deleteExpired();
}, 60 * 1000);
}

public static async newInstance(acctEmail: string, gmail: Gmail, relayManager: RelayManager, factory: XssSafeFactory, debug = false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export class GmailElementReplacer extends WebmailElementReplacer {
this.evaluateStandardComposeRecipients().catch(Catch.reportErr);
this.addSettingsBtn();
this.renderLocalDrafts().catch(Catch.reportErr);
this.messageRenderer.deleteExpired();
};

private replaceArmoredBlocks = async () => {
Expand Down
Loading