From ab163ffa396193cc4953da403997d274cb72fa9b Mon Sep 17 00:00:00 2001 From: Moyasee Date: Fri, 19 Sep 2025 17:35:11 +0300 Subject: [PATCH] reductant assignments fix + extracted operation into independent statement --- src/main/index.ts | 15 --------------- .../src/components/sidebar/sidebar-game-item.tsx | 12 +++++++++--- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index b78deef3..e6f40497 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -95,30 +95,15 @@ app.whenReady().then(async () => { y2 = "100%"; if (direction === "to right") { - // x1 = "0%"; // Already set to default value - // y1 = "0%"; // Already set to default value - x2 = "100%"; y2 = "0%"; } else if (direction === "to bottom") { - // x1 = "0%"; // Already set to default value - // y1 = "0%"; // Already set to default value x2 = "0%"; - y2 = "100%"; } else if (direction === "45deg") { - // x1 = "0%"; // Already set to default value y1 = "100%"; - x2 = "100%"; y2 = "0%"; - } else if (direction === "135deg") { - // x1 = "0%"; // Already set to default value - // y1 = "0%"; // Already set to default value - x2 = "100%"; - // y2 = "100%"; // Already set to default value } else if (direction === "225deg") { x1 = "100%"; - // y1 = "0%"; // Already set to default value x2 = "0%"; - // y2 = "100%"; // Already set to default value } else if (direction === "315deg") { x1 = "100%"; y1 = "100%"; diff --git a/src/renderer/src/components/sidebar/sidebar-game-item.tsx b/src/renderer/src/components/sidebar/sidebar-game-item.tsx index 108a5536..7733aee0 100644 --- a/src/renderer/src/components/sidebar/sidebar-game-item.tsx +++ b/src/renderer/src/components/sidebar/sidebar-game-item.tsx @@ -22,6 +22,14 @@ export function SidebarGameItem({ ? game.libraryImageUrl || game.iconUrl : game.customIconUrl || game.iconUrl; + // Determine fallback icon based on game type + const getFallbackIcon = () => { + if (isCustomGame) { + return ; + } + return ; + }; + return (
  • - ) : isCustomGame ? ( - ) : ( - + getFallbackIcon() )}