From 67fa46ce966fbccbff57463f41c886a846b4b499 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 5 Aug 2020 10:43:04 +0200 Subject: [PATCH] Avoid extra request to server for update-in-place refresh --- mail/js/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index f230a086cb..3e34742e2c 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -192,7 +192,12 @@ app.classes.mail = AppJS.extend( if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined')) { var self = this; - jQuery(nm).on('refresh',function() {self.mail_refreshFolderStatus.call(self,undefined,undefined,false);}); + jQuery(nm).on('refresh',function(_event, _widget, _row_id, _type) { + if (_type !== 'update-in-place') + { + self.mail_refreshFolderStatus.call(self,undefined,undefined,false); + } + }); } var tree_wdg = this.et2.getWidgetById(this.nm_index+'[foldertree]'); if (tree_wdg)