From 667934f79a861a0f82c79520e153ba776434d65c Mon Sep 17 00:00:00 2001
From: Mora Unie Youer <mora_unie_youer@riseup.net>
Date: Sun, 2 Mar 2025 23:09:55 +0300
Subject: fix: phantom icon in system tray

---
 widget/bar/Bar.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'widget/bar/Bar.tsx')

diff --git a/widget/bar/Bar.tsx b/widget/bar/Bar.tsx
index 41dc0e2..d89dc5f 100644
--- a/widget/bar/Bar.tsx
+++ b/widget/bar/Bar.tsx
@@ -86,14 +86,13 @@ function AudioVolume() {
 
 
 function Tray() {
-  // BUG: personally I have one fantom icon being along other tray icons
-  // For now I don't have any ideas why this is happening
   // TODO: rewrite this using more elements, as this is really restricted design
   const tray = AstalTray.get_default();
 
   return <box cssClasses={["Tray"]}>
     {bind(tray, "items").as(items =>
-      items.map(item =>
+      // NOTE: this fixes bug with fantom icon, but I don't think that this is a good idea
+      items.filter(item => item.gicon !== null).map(item =>
         <menubutton
           setup={self => self.insert_action_group("dbusmenu", item.actionGroup)}
           tooltipText={bind(item, "tooltipMarkup")}
-- 
cgit v1.2.3-70-g09d2

