From 7a79d56843206101cb038f7ee9b94f9340fa275a Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 17 Jan 2019 09:58:27 +0100 Subject: [PATCH] MOBILE-2829 mac: Ignore the single instance lock in Mac --- desktop/electron.js | 4 +++- src/assets/lang/en.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/electron.js b/desktop/electron.js index c7f1359a9..343f81a5b 100644 --- a/desktop/electron.js +++ b/desktop/electron.js @@ -71,9 +71,11 @@ function createWindow() { } // Make sure that only a single instance of the app is running. +// For some reason, gotTheLock is always false in signed Mac apps so we should ingore it. +// See https://github.com/electron/electron/issues/15958 var gotTheLock = app.requestSingleInstanceLock(); -if (!gotTheLock) { +if (!gotTheLock && os.platform().indexOf('darwin') == -1) { // It's not the main instance of the app, kill it. app.exit(); return; diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 4029982e6..d44abe8ad 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -1246,6 +1246,7 @@ "core.courses.enrolme": "Enrol me", "core.courses.errorloadcategories": "An error occurred while loading categories.", "core.courses.errorloadcourses": "An error occurred while loading courses.", + "core.courses.errorloadplugins": "The plugins required by this course could not be loaded correctly. Please restart the app to try again.", "core.courses.errorsearching": "An error occurred while searching.", "core.courses.errorselfenrol": "An error occurred while self enrolling.", "core.courses.filtermycourses": "Filter my courses",