[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:
@@ -32,6 +32,8 @@ export function handleAppSecondInstance(event: Event, argv: string[]) {
|
|||||||
const deeplinkingURL = getDeeplinkingURL(argv);
|
const deeplinkingURL = getDeeplinkingURL(argv);
|
||||||
if (deeplinkingURL) {
|
if (deeplinkingURL) {
|
||||||
openDeepLink(deeplinkingURL);
|
openDeepLink(deeplinkingURL);
|
||||||
|
} else if (MainWindow.get()) {
|
||||||
|
MainWindow.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -394,8 +394,8 @@ async function initializeAfterAppReady() {
|
|||||||
|
|
||||||
let deeplinkingURL;
|
let deeplinkingURL;
|
||||||
|
|
||||||
// Protocol handler for win32
|
// Protocol handler for win32 and linux
|
||||||
if (process.platform === 'win32') {
|
if (process.platform !== 'darwin') {
|
||||||
const args = process.argv.slice(1);
|
const args = process.argv.slice(1);
|
||||||
if (Array.isArray(args) && args.length > 0) {
|
if (Array.isArray(args) && args.length > 0) {
|
||||||
deeplinkingURL = getDeeplinkingURL(args);
|
deeplinkingURL = getDeeplinkingURL(args);
|
||||||
|
Reference in New Issue
Block a user