fix: freeze screen while pulling emails
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
parent
928428c6a7
commit
5c1e0c2bc9
1 changed files with 2 additions and 1 deletions
|
|
@ -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" });
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue