From 817c863785ec4097011b95757c73fa3fa660db60 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:38:13 -0500 Subject: [PATCH] [MM-61864] Fix issue where the app will not restore when opened again from cold, fix issue where deep linking from cold didn't work on Linux (#3214) * [MM-61864] Fix issue where the app will not restore when opened again from cold, fix issue where deep linking from cold didn't work on Linux * Update src/main/app/initialize.ts Co-authored-by: Maria A Nunez --------- Co-authored-by: Maria A Nunez (cherry picked from commit fad05fd774b7195e006477634516e0d664598ca8) --- src/main/app/app.ts | 2 ++ src/main/app/initialize.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/app/app.ts b/src/main/app/app.ts index a22684b214d..1bb32ffd48e 100644 --- a/src/main/app/app.ts +++ b/src/main/app/app.ts @@ -32,6 +32,8 @@ export function handleAppSecondInstance(event: Event, argv: string[]) { const deeplinkingURL = getDeeplinkingURL(argv); if (deeplinkingURL) { openDeepLink(deeplinkingURL); + } else if (MainWindow.get()) { + MainWindow.show(); } } diff --git a/src/main/app/initialize.ts b/src/main/app/initialize.ts index 1d3b193d277..fe84e04e5ac 100644 --- a/src/main/app/initialize.ts +++ b/src/main/app/initialize.ts @@ -394,8 +394,8 @@ async function initializeAfterAppReady() { let deeplinkingURL; - // Protocol handler for win32 - if (process.platform === 'win32') { + // Protocol handler for win32 and linux + if (process.platform !== 'darwin') { const args = process.argv.slice(1); if (Array.isArray(args) && args.length > 0) { deeplinkingURL = getDeeplinkingURL(args);