mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-19 20:00:54 +01:00
defer calls to mail_refreshFolderStatus for 2s, to accumulate updates of multiple rows e.g. deleting multiple emails
This commit is contained in:
parent
bf49c486ae
commit
07d6488593
@ -214,10 +214,19 @@ app.classes.mail = AppJS.extend(
|
|||||||
if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined'))
|
if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined'))
|
||||||
{
|
{
|
||||||
var self = this;
|
var self = this;
|
||||||
jQuery(nm).on('refresh',function(_event, _widget, _row_id, _type) {
|
jQuery(nm).on('refresh', (_event, _widget, _row_id, _type) =>
|
||||||
|
{
|
||||||
if (!self.push_active[_widget.settings.foldertree.split("::")[0]])
|
if (!self.push_active[_widget.settings.foldertree.split("::")[0]])
|
||||||
{
|
{
|
||||||
self.mail_refreshFolderStatus.call(self,undefined,undefined,false);
|
// defer calls to mail_refreshFolderStatus for 2s, to accumulate updates of multiple rows e.g. deleting multiple emails
|
||||||
|
if (typeof self.refresh_timeout === 'undefined')
|
||||||
|
{
|
||||||
|
self.refresh_timeout = window.setTimeout(() =>
|
||||||
|
{
|
||||||
|
delete self.refresh_timeout;
|
||||||
|
self.mail_refreshFolderStatus.call(self, undefined, undefined, false);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -6506,4 +6515,4 @@ app.classes.mail = AppJS.extend(
|
|||||||
resizable: false,
|
resizable: false,
|
||||||
}, et2_dialog._create_parent('mail'));
|
}, et2_dialog._create_parent('mail'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user