Skip to content

Commit

Permalink
change comments after feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
LenaWil committed Dec 14, 2024
1 parent beec81c commit aad4341
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/backend/tray_icon/tray_icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ export const initTrayIcon = async (mainWindow: BrowserWindow) => {
// create icon
const appIcon = new Tray(getIcon(process.platform))

// helper function to set/update the context menu
// helper function to set/update the context menu and on macOS the dock menu
const loadContextMenu = async (recentGames?: RecentGame[]) => {
recentGames ??= await getRecentGames({ limited: true })
const newContextMenu = contextMenu(mainWindow, recentGames)
appIcon.setContextMenu(newContextMenu)
// makes the tray icon menu appear in the dock too on macOS
if (isMac) app.dock.setMenu(newContextMenu)
}
await loadContextMenu()
Expand Down

0 comments on commit aad4341

Please sign in to comment.