Case 19446 - Update via Sandbox Popup -- opens Old Interface

This commit is contained in:
Roxanne Skelly 2018-10-22 15:44:16 -07:00
parent 40b77c338c
commit 91f9227686
2 changed files with 10 additions and 6 deletions

View file

@ -877,10 +877,6 @@ function onContentLoaded() {
hasShownUpdateNotification = true; hasShownUpdateNotification = true;
} }
}); });
notifier.on('click', function(notifierObject, options) {
log.debug("Got click", options.url);
shell.openExternal(options.url);
});
} }
deleteOldFiles(logPath, DELETE_LOG_FILES_OLDER_THAN_X_SECONDS, LOG_FILE_REGEX); deleteOldFiles(logPath, DELETE_LOG_FILES_OLDER_THAN_X_SECONDS, LOG_FILE_REGEX);

View file

@ -5,6 +5,8 @@ const process = require('process');
const hfApp = require('./hf-app'); const hfApp = require('./hf-app');
const path = require('path'); const path = require('path');
const AccountInfo = require('./hf-acctinfo').AccountInfo; const AccountInfo = require('./hf-acctinfo').AccountInfo;
const url = require('url');
const shell = require('electron').shell;
const GetBuildInfo = hfApp.getBuildInfo; const GetBuildInfo = hfApp.getBuildInfo;
const buildInfo = GetBuildInfo(); const buildInfo = GetBuildInfo();
const osType = os.type(); const osType = os.type();
@ -154,8 +156,14 @@ function HifiNotifications(config, menuNotificationCallback) {
var _menuNotificationCallback = menuNotificationCallback; var _menuNotificationCallback = menuNotificationCallback;
notifier.on('click', function (notifierObject, options) { notifier.on('click', function (notifierObject, options) {
StartInterface(options.url); const optUrl = url.parse(options.url);
_menuNotificationCallback(options.notificationType, false); if ((optUrl.protocol === "hifi") || (optUrl.protocol === "hifiapp")) {
StartInterface(options.url);
_menuNotificationCallback(options.notificationType, false);
}
else {
shell.openExternal(options.url);
}
}); });
} }