diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 5af86d5066..cb84abfc10 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1555,6 +1555,11 @@ class mail_ui $mail_ui->mail_bo->icServer->pushAvailable()) { $mail_ui->mail_bo->icServer->enablePush(); + Api\Json\Response::get()->call('app.mail.disable_autorefresh', true); + } + else + { + Api\Json\Response::get()->call('app.mail.disable_autorefresh', false); } //error_log(__METHOD__.__LINE__.' SelectedFolder:'.$query['selectedFolder'].' Start:'.$query['start'].' NumRows:'.$query['num_rows'].array2string($query['order']).'->'.array2string($query['sort'])); //Mail::$debugTimes=true; diff --git a/mail/js/app.js b/mail/js/app.js index 6800bf09f7..f44a8876f5 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -137,6 +137,19 @@ app.classes.mail = AppJS.extend( this._super.apply(this, arguments); }, + /** + * Dynamic disable NM autorefresh on get_rows response depending on push support of imap-server + * + * @param {bool} _disable + */ + disable_autorefresh: function(_disable) + { + if (this.checkET2()) + { + this.et2.getWidgetById('nm').set_disable_autorefresh(_disable); + } + }, + /** * check and try to reinitialize et2 of module */