From 4d459ac09e34e1e2476731ef5fbb390a5516aad9 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:15:41 -0300 Subject: [PATCH] fix: tray not showing recent games on windows --- src/main/services/window-manager.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 956dc86f..b3d3ff37 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -372,12 +372,12 @@ export class WindowManager { const sortedGames = sortBy(filteredGames, "lastTimePlayed", "DESC"); - return slice(sortedGames, 5); + return slice(sortedGames, 0, 5); }); const recentlyPlayedGames: Array = games.map(({ title, executablePath }) => ({ - label: title.length > 15 ? `${title.slice(0, 15)}…` : title, + label: title.length > 18 ? `${title.slice(0, 18)}…` : title, type: "normal", click: async () => { if (!executablePath) return; @@ -418,7 +418,10 @@ export class WindowManager { }, ]); - tray.setContextMenu(contextMenu); + if (process.platform === "linux") { + tray.setContextMenu(contextMenu); + } + return contextMenu; };