From 3a48f5d4a69e8910334e440b58874f48d859e733 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 17 Jul 2018 11:36:49 +0200 Subject: [PATCH] MOBILE-2478 windows: Fix notifications not displayed in Windows --- desktop/electron.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desktop/electron.js b/desktop/electron.js index 1b338dd02..252d9f809 100644 --- a/desktop/electron.js +++ b/desktop/electron.js @@ -88,19 +88,25 @@ app.on('activate', () => { fs.readFile(path.join(__dirname, 'config.json'), 'utf8', (err, data) => { configRead = true; - var ssoScheme = 'moodlemobile'; // Default value. + // Default values. + var ssoScheme = 'moodlemobile', + appId = 'com.moodle.moodlemobile'; if (!err) { try { data = JSON.parse(data); ssoScheme = data.customurlscheme; appName = data.desktopappname; + appId = data.app_id; } catch(ex) {} } // Set default protocol (custom URL scheme). app.setAsDefaultProtocolClient(ssoScheme); + // Fix notifications in Windows. + app.setAppUserModelId(appId); + if (isReady) { setAppMenu(); }