dynamic disable NM autorefresh on get_rows response depending on push support of imap-server

This commit is contained in:
Ralf Becker 2020-08-11 15:52:12 +02:00
parent ed1be70235
commit 6bd87cafb5
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -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
*/