mirror of
https://github.com/sascha-hemi/homeassistant-desktop.git
synced 2026-03-21 02:04:23 +01:00
fix: Fixed a bug when cancel button is selected in "Reset Application" menu
This commit is contained in:
28
app.js
28
app.js
@@ -391,20 +391,22 @@ function getMenu() {
|
||||
buttons: ['Reset Everything!', 'Reset Windows', 'Cancel'],
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.response === 0) {
|
||||
config.clear();
|
||||
mainWindow.webContents.session.clearCache();
|
||||
mainWindow.webContents.session.clearStorageData();
|
||||
} else {
|
||||
config.delete('windowSizeDetached');
|
||||
config.delete('windowSize');
|
||||
config.delete('windowPosition');
|
||||
config.delete('fullScreen');
|
||||
config.delete('detachedMode');
|
||||
}
|
||||
if (res.response !== 2) {
|
||||
if (res.response === 0) {
|
||||
config.clear();
|
||||
mainWindow.webContents.session.clearCache();
|
||||
mainWindow.webContents.session.clearStorageData();
|
||||
} else {
|
||||
config.delete('windowSizeDetached');
|
||||
config.delete('windowSize');
|
||||
config.delete('windowPosition');
|
||||
config.delete('fullScreen');
|
||||
config.delete('detachedMode');
|
||||
}
|
||||
|
||||
app.relaunch();
|
||||
app.exit();
|
||||
app.relaunch();
|
||||
app.exit();
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user