electron / electron/update-electron-app

Behavior when pressing later button

Open
#194 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
824
Forks
145
Avg merge
9h 22m
Merged PRs (30d)
3

Description

Thank you for this great software.

I'm creating a UI that allows user to manually restart the app after the user presses the "later" button.
However, I can't currently get the information about when "later" is pressed.

It would be very helpful if you could add a callback function to the function returned by makeUserNotifier and pass the response value.
I would be grateful if you could add it if possible.

```typescript
return (info: IUpdateInfo, callback?: (response) => void) => {
const { releaseNotes, releaseName } = info;
const { title, restartButtonText, laterButtonText, detail } = assignedDialog;

const dialogOpts: Electron.MessageBoxOptions = {
type: 'info',
buttons: [restartButtonText, laterButtonText],
title,
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail,
};

dialog.showMessageBox(dialogOpts).then(({ response }) => {
if (response === 0) {
autoUpdater.quitAndInstall();
}
if (callback) {
callback(response);
}
});
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.