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
parent bb0b93bf67
commit 371bb59bdf
2 changed files with 7 additions and 3 deletions

View File

@ -1703,6 +1703,10 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
else else
{ {
$sortResult = array(); $sortResult = array();
$uids = array_map(function($row_id)
{
return self::splitRowID($row_id)['msgUID'];
}, (array)$query['col_filter']['row_id']) ?: null;
// fetch headers // fetch headers
$sortResultwH = $mail_ui->mail_bo->getHeaders( $sortResultwH = $mail_ui->mail_bo->getHeaders(
$_folderName, $_folderName,
@ -1711,7 +1715,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
$sort, $sort,
$reverse, $reverse,
$filter, $filter,
null, // this uids only $uids, // this uids only
true, // cacheResult true, // cacheResult
($query['filter2']?true:false) // fetchPreview ($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') if (pushData.acl.folder && typeof pushData.acl.unseen !== 'undefined')
{ {
let folder_id = {}; 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); this.mail_setFolderStatus(folder_id);
} }
}, },
@ -441,7 +441,7 @@ app.classes.mail = AppJS.extend(
let framework = egw_getFramework(); let framework = egw_getFramework();
let notify = this.egw.preference('new_mail_notification', 'mail'); let notify = this.egw.preference('new_mail_notification', 'mail');
// never notify for Trash, Junk or Drafts folder // 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' || if (typeof notify === 'undefined' || notify === 'always' ||
notify === 'not-mail' && framework && framework.activeApp.appName !== 'mail') notify === 'not-mail' && framework && framework.activeApp.appName !== 'mail')
{ {