[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 <maria.nunez@mattermost.com>

---------

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
This commit is contained in:
Devin Binnie
2024-11-19 16:38:13 -05:00
committed by GitHub
parent bbc2dc5492
commit fad05fd774
2 changed files with 4 additions and 2 deletions

View File

@@ -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();
}
}

View File

@@ -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);