From ee75cea4fe22c79b3163c2a593c7be61622f4a9c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 7 Jul 2021 22:39:12 +0530 Subject: [PATCH] fix: Enable set_open_count perf: move set_open_count to after_refresh to avoid unnecessary calls --- frappe/public/js/frappe/form/dashboard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/dashboard.js b/frappe/public/js/frappe/form/dashboard.js index 6833f68073..b2b0c11d54 100644 --- a/frappe/public/js/frappe/form/dashboard.js +++ b/frappe/public/js/frappe/form/dashboard.js @@ -5,7 +5,6 @@ frappe.ui.form.Dashboard = class FormDashboard { constructor(opts) { $.extend(this, opts); this.setup_dashboard_sections(); - this.set_open_count = frappe.utils.throttle(this.set_open_count, 500); } setup_dashboard_sections() { @@ -179,7 +178,6 @@ frappe.ui.form.Dashboard = class FormDashboard { return; } this.render_links(); - // this.set_open_count(); show = true; } @@ -206,6 +204,7 @@ frappe.ui.form.Dashboard = class FormDashboard { $(this).removeClass('hidden'); } }); + this.set_open_count(); } init_data() {