pass requested uids to backend, also ignore Sent folder for notification and fix update of foldername

This commit is contained in:
Ralf Becker 2020-08-04 18:17:04 +02:00 committed by Hadi Nategh
parent 01b59942fb
commit a12493b5f6
2 changed files with 7 additions and 3 deletions

View File

@ -1703,6 +1703,10 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
else
{
$sortResult = array();
$uids = array_map(function($row_id)
{
return self::splitRowID($row_id)['msgUID'];
}, (array)$query['col_filter']['row_id']) ?: null;
// fetch headers
$sortResultwH = $mail_ui->mail_bo->getHeaders(
$_folderName,
@ -1711,7 +1715,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
$sort,
$reverse,
$filter,
null, // this uids only
$uids, // this uids only
true, // cacheResult
($query['filter2']?true:false) // fetchPreview
);

View File

@ -426,7 +426,7 @@ app.classes.mail = AppJS.extend(
if (pushData.acl.folder && typeof pushData.acl.unseen !== 'undefined')
{
let folder_id = {};
folder_id[folder] = pushData.acl.folder+(pushData.acl.unseen ? " ("+pushData.acl.unseen+")" : '');
folder_id[folder] = foldertree.getLabel(folder).replace(this._unseen_regexp, '')+(pushData.acl.unseen ? " ("+pushData.acl.unseen+")" : '');
this.mail_setFolderStatus(folder_id);
}
},
@ -441,7 +441,7 @@ app.classes.mail = AppJS.extend(
let framework = egw_getFramework();
let notify = this.egw.preference('new_mail_notification', 'mail');
// never notify for Trash, Junk or Drafts folder
if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts)$/)) return;
if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts|Sent)$/)) return;
if (typeof notify === 'undefined' || notify === 'always' ||
notify === 'not-mail' && framework && framework.activeApp.appName !== 'mail')
{