From 10cb02793a3adac935c6696a7dca2f5a8c6cf9d3 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Fri, 17 Jan 2025 13:51:07 +1100
Subject: bluetoothdevices: fallback icon

---
 src/modules/popdowns/bluetoothdevices.tsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src/modules/popdowns/bluetoothdevices.tsx')

diff --git a/src/modules/popdowns/bluetoothdevices.tsx b/src/modules/popdowns/bluetoothdevices.tsx
index f41516a..7ba421c 100644
--- a/src/modules/popdowns/bluetoothdevices.tsx
+++ b/src/modules/popdowns/bluetoothdevices.tsx
@@ -1,11 +1,16 @@
 import { bind, Variable } from "astal";
-import { Gtk } from "astal/gtk3";
+import { Astal, Gtk } from "astal/gtk3";
 import AstalBluetooth from "gi://AstalBluetooth";
 import PopdownWindow from "../../widgets/popdownwindow";
 
 const BluetoothDevice = (device: AstalBluetooth.Device) => (
     <box className="device">
-        <icon className="icon" icon={bind(device, "icon").as(i => `${i}-symbolic`)} />
+        <icon
+            className="icon"
+            icon={bind(device, "icon").as(i =>
+                Astal.Icon.lookup_icon(`${i}-symbolic`) ? `${i}-symbolic` : "bluetooth-symbolic"
+            )}
+        />
         <label
             truncate
             xalign={0}
-- 
cgit v1.2.3-freya

