Skip to content

Commit a5cd919

Browse files
committed
show update notification once, add new blog post link to documentation
1 parent c23e960 commit a5cd919

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

src/main/app.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -532,29 +532,34 @@ export class JupyterApplication implements IApplication, IDisposable {
532532
}
533533

534534
private _setupAutoUpdater() {
535-
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
536-
const dialogOpts: Electron.MessageBoxOptions = {
537-
type: 'info',
538-
buttons: ['Restart', 'Later'],
539-
title: 'Application Update',
540-
message: process.platform === 'win32' ? releaseNotes : releaseName,
541-
detail:
542-
'A new version has been downloaded. Restart the application to apply the updates.'
543-
};
535+
autoUpdater.once(
536+
'update-downloaded',
537+
(event, releaseNotes, releaseName) => {
538+
const dialogOpts: Electron.MessageBoxOptions = {
539+
type: 'info',
540+
buttons: ['Restart', 'Later'],
541+
title: 'Application Update',
542+
message: process.platform === 'win32' ? releaseNotes : releaseName,
543+
detail:
544+
'A new version has been downloaded. Restart the application to apply the updates.'
545+
};
544546

545-
dialog.showMessageBox(dialogOpts).then(returnValue => {
546-
if (returnValue.response === 0) {
547-
if (
548-
userSettings.getValue(SettingType.updateBundledEnvAutomatically) &&
549-
bundledEnvironmentIsInstalled()
550-
) {
551-
appData.updateBundledEnvOnRestart = true;
552-
appData.save();
547+
dialog.showMessageBox(dialogOpts).then(returnValue => {
548+
if (returnValue.response === 0) {
549+
if (
550+
userSettings.getValue(
551+
SettingType.updateBundledEnvAutomatically
552+
) &&
553+
bundledEnvironmentIsInstalled()
554+
) {
555+
appData.updateBundledEnvOnRestart = true;
556+
appData.save();
557+
}
558+
autoUpdater.quitAndInstall();
553559
}
554-
autoUpdater.quitAndInstall();
555-
}
556-
});
557-
});
560+
});
561+
}
562+
);
558563

559564
autoUpdater.on('error', message => {
560565
log.error('There was a problem updating the application');

troubleshoot.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ You can use the CLI commands to list and change project setting overrides. See [
291291

292292
This repo contains the most up to date documentation on JupyterLab Desktop. However you can refer to the Jupyter blog posts on JLD for more context and information on the application. Below are the links to the blog posts.
293293

294+
- [Python environment management using JupyterLab Desktop CLI (03/01/2024)](https://blog.jupyter.org/python-environment-management-using-jupyterlab-desktop-cli-e57485c9287c)
294295
- [Python environment management in JupyterLab Desktop (02/20/2024)](https://blog.jupyter.org/python-environment-management-in-jupyterlab-desktop-3b119c5811d9)
295296
- [Introducing the new JupyterLab Desktop! (02/09/2023)](https://blog.jupyter.org/introducing-the-new-jupyterlab-desktop-bca1982bdb23)
296297
- [JupyterLab Desktop — 2022 recap (12/13/2022)](https://blog.jupyter.org/jupyterlab-desktop-2022-recap-28bdf00205c6)

0 commit comments

Comments
 (0)