electron / electron/update-electron-app
Behavior when pressing later button
- 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.