mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
fix folder badge was not updated when rightclick 'mark all as read' was clicked
This commit is contained in:
parent
e0814c6be2
commit
5255a8ecf8
@ -4129,7 +4129,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
* @param array $_folder folders to refresh its unseen message counters
|
||||
* @return nothing
|
||||
*/
|
||||
function ajax_setFolderStatus($_folder)
|
||||
function ajax_setFolderStatus($_folder, $force_change = false)
|
||||
{
|
||||
Api\Translation::add_app('mail');
|
||||
//error_log(__METHOD__.__LINE__.array2string($_folder));
|
||||
@ -4155,7 +4155,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
continue;
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.array2string($fS));
|
||||
if ($fS['unseen'])
|
||||
if ($fS['unseen'] || $force_change)
|
||||
{
|
||||
$oA[$_folderName] = ''.$fS['unseen'];
|
||||
}
|
||||
@ -5301,6 +5301,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
}
|
||||
else if ((isset($_messageList['all']) && $_messageList['all']) || ($query['filter'] && ($flag2check==$query['filter'] || stripos($query['filter'],$flag2check)!==false)))
|
||||
{
|
||||
self::ajax_setFolderStatus([$_messageList['msg']['0']],true);
|
||||
$response->call('egw.refresh',lang('flagged %1 messages as %2 in %3',(isset($_messageList['all']) && $_messageList['all']?lang('all'):count($_messageList['msg'])),lang(($flag[$_flag]?$flag[$_flag]:$_flag)),lang($folder)),'mail');
|
||||
}
|
||||
else
|
||||
|
@ -1928,11 +1928,13 @@ app.classes.mail = AppJS.extend(
|
||||
for (const folderId in _status) {
|
||||
//ftree.setLabel(folderId,_status[folderId]["displayName"]);
|
||||
// display folder-name bold for unseen mails
|
||||
if(_status[folderId] ===0 || _status[folderId] ==="0") _status[folderId] = null;
|
||||
if(_status[folderId])
|
||||
{
|
||||
ftree.setClass(folderId, 'unread','+');
|
||||
}else if(!_status[folderId] || _status[folderId] ===0 || _status[folderId] ==="0") {
|
||||
ftree.setClass(folderId, 'unread','-');
|
||||
_status[folderId]=null;
|
||||
}
|
||||
ftree.set_badge(folderId,_status[folderId]);
|
||||
//alert(i +'->'+_status[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user