mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
reduceCounter fix for badges in Mail tree v2
This commit is contained in:
parent
8056460464
commit
0260b8723a
@ -509,12 +509,9 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
||||
*/
|
||||
setStyle(_id, _style)
|
||||
{
|
||||
var temp = this.getDomNode(_id).defaultSlot;
|
||||
const temp = this.getDomNode(_id).defaultSlot;
|
||||
if (!temp) return 0;
|
||||
if (!temp.style.cssText)
|
||||
temp.setAttribute("style", _style);
|
||||
else
|
||||
temp.style.cssText = temp.style.cssText + ";" + _style;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1950,7 +1950,7 @@ app.classes.mail = AppJS.extend(
|
||||
if(_status[folderId]["unseenCount"])
|
||||
{
|
||||
ftree.setStyle(folderId, 'font-weight: bold !important');
|
||||
}else {
|
||||
}else if(!_status[folderId]["unseenCount"] || _status[folderId]["unseenCount"] ===0 || _status[folderId]["unseenCount"] ==="0") {
|
||||
ftree.setStyle(folderId, 'font-weight: normal');
|
||||
}
|
||||
ftree.set_badge(folderId,_status[folderId]["unseenCount"]);
|
||||
@ -2177,8 +2177,12 @@ app.classes.mail = AppJS.extend(
|
||||
if (icounter>0)
|
||||
{
|
||||
let newcounter = icounter - 1;
|
||||
if (newcounter === 0) newcounter = null;
|
||||
ftree.set_badge(_foldernode.id, newcounter)
|
||||
if (newcounter === 0)
|
||||
{
|
||||
newcounter = null;
|
||||
ftree.setStyle(_foldernode.id, 'font-weight: normal');
|
||||
}
|
||||
ftree.set_badge(_foldernode.id, newcounter?.toString());
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user