Codebase list gnome-shell-extension-appindicator / 6ebe41b
appIndicator: Use native checks to look for equal emblems Marco Trevisan (TreviƱo) 3 years ago
1 changed file(s) with 9 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
567567 }
568568
569569 if (this.gicon) {
570 if (!this._emblem || !this.gicon.get_emblems().includes(this._emblem)) {
570 if (!this.gicon.get_emblems().some(e => e.equal(this._emblem))) {
571571 this.gicon.clear_emblems();
572572 if (this._emblem)
573573 this.gicon.add_emblem(this._emblem);
623623
624624 _updateOverlayIcon() {
625625 // remove old icon
626 if (this.gicon && this.gicon.get_emblems().length) {
627 let [emblem] = this.gicon.get_emblems();
628
629 if (emblem.inUse)
630 emblem.inUse = false
626 if (this.gicon) {
627 let emblems = this.gicon.get_emblems();
628 if (emblems.length == 1) {
629 let [emblem] = emblems;
630
631 if (emblem.inUse)
632 emblem.inUse = false
633 }
631634 }
632635
633636 // KDE hardcodes the overlay icon size to 10px (normal icon size 16px)