From e23bb8a1e464ac94f646434241a1fe0166420773 Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Fri, 18 Jul 2025 21:28:46 +0200 Subject: [PATCH] Fix logic for DeviceCard controls --- .../features/devices/components/DeviceCard.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/apps/dashboard/features/devices/components/DeviceCard.tsx b/src/apps/dashboard/features/devices/components/DeviceCard.tsx index 1ee65f8d7..50f796b88 100644 --- a/src/apps/dashboard/features/devices/components/DeviceCard.tsx +++ b/src/apps/dashboard/features/devices/components/DeviceCard.tsx @@ -130,7 +130,8 @@ const DeviceCard = ({ device }: DeviceCardProps) => { getDeviceIcon(device) ), [ device ]); - const canControl = device.ServerId && device.NowPlayingItem && device.SupportsRemoteControl; + const canControl = device.ServerId && device.SupportsRemoteControl; + const isPlayingMedia = !!device.NowPlayingItem; return ( @@ -219,7 +220,7 @@ const DeviceCard = ({ device }: DeviceCardProps) => { )} - {canControl && ( + {canControl && isPlayingMedia && ( <> {device.PlayState?.IsPaused ? : } @@ -227,14 +228,15 @@ const DeviceCard = ({ device }: DeviceCardProps) => { - - - )} - + {isPlayingMedia && ( + + )} + {canControl && ( + )} {device.UserName && (