Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Fix Mac App Store build crashes when relaunching #56

Merged
merged 1 commit into from
Aug 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions public/listeners/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,25 @@ const loadListeners = () => {
dialog.showMessageBox(BrowserWindow.getAllWindows()[0], {
type: 'question',
buttons: ['Reset Now', 'Cancel'],
message: 'Are you sure? All preferences will be restored to their original defaults. Browsing data won\'t be affected. This action cannot be undone.',
message: 'Are you sure? All preferences will be restored to their original defaults. This action cannot be undone.',
cancelId: 1,
}, (response) => {
if (response === 0) {
resetPreferences();

ipcMain.emit('request-show-require-restart-dialog');
}
});
});

ipcMain.on('request-show-require-restart-dialog', () => {
dialog.showMessageBox({
type: 'question',
buttons: ['Restart Now', 'Later'],
message: 'You need to restart the app for this change to take affect.',
buttons: ['Quit Now', 'Later'],
message: 'You need to quit and then manually restart the app for this change to take affect.',
cancelId: 1,
}, (response) => {
if (response === 0) {
app.relaunch();
app.quit();
}
});
Expand Down