mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-26 06:00:02 +02:00
Update update notification to only show once
This commit is contained in:
parent
a62da96785
commit
dc1d1dfebd
1 changed files with 11 additions and 7 deletions
|
@ -583,15 +583,19 @@ app.on('ready', function() {
|
||||||
|
|
||||||
if (currentVersion !== null) {
|
if (currentVersion !== null) {
|
||||||
const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 60 * 30;
|
const CHECK_FOR_UPDATES_INTERVAL_SECONDS = 60 * 30;
|
||||||
|
var hasShownUpdateNotification = false;
|
||||||
const updateChecker = new updater.UpdateChecker(currentVersion, CHECK_FOR_UPDATES_INTERVAL_SECONDS);
|
const updateChecker = new updater.UpdateChecker(currentVersion, CHECK_FOR_UPDATES_INTERVAL_SECONDS);
|
||||||
updateChecker.on('update-available', function(latestVersion, url) {
|
updateChecker.on('update-available', function(latestVersion, url) {
|
||||||
notifier.notify({
|
if (!hasShownUpdateNotification) {
|
||||||
icon: trayIcon,
|
notifier.notify({
|
||||||
title: 'An update is available!',
|
icon: trayIcon,
|
||||||
message: 'High Fidelity version ' + latestVersion + ' is available',
|
title: 'An update is available!',
|
||||||
wait: true,
|
message: 'High Fidelity version ' + latestVersion + ' is available',
|
||||||
url: url
|
wait: true,
|
||||||
});
|
url: url
|
||||||
|
});
|
||||||
|
hasShownUpdateNotification = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
notifier.on('click', function(notifierObject, options) {
|
notifier.on('click', function(notifierObject, options) {
|
||||||
console.log("Got click", options.url);
|
console.log("Got click", options.url);
|
||||||
|
|
Loading…
Reference in a new issue