From 5c1e0c2bc95c762b2c62004b9eac27edeebac89a Mon Sep 17 00:00:00 2001 From: Sumit Bhanushali Date: Thu, 11 Jul 2024 11:31:33 +0530 Subject: [PATCH] fix: freeze screen while pulling emails Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/email/doctype/email_account/email_account.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/email/doctype/email_account/email_account.js b/frappe/email/doctype/email_account/email_account.js index e5e6254d78..cef9ce090b 100644 --- a/frappe/email/doctype/email_account/email_account.js +++ b/frappe/email/doctype/email_account/email_account.js @@ -157,11 +157,12 @@ frappe.ui.form.on("Email Account", { if (!frm.is_dirty() && frm.doc.enable_incoming) { frm.add_custom_button(__("Pull Emails"), () => { - frappe.show_alert({ message: __("Pulling Emails..."), indicator: "blue" }); + frappe.dom.freeze(__('Pulling emails...')); frm.call({ method: "pull_emails", args: { email_account: frm.doc.name }, }).then(() => { + frappe.dom.unfreeze(); frappe.show_alert({ message: __("Emails Pulled"), indicator: "green" }); }); });