()
| 182 | } |
| 183 | |
| 184 | function reloadApp() { |
| 185 | const currWin = BrowserWindow.getFocusedWindow(); |
| 186 | |
| 187 | const preventUnload = (event) => { |
| 188 | event.preventDefault(); |
| 189 | currWin.webContents.off('will-prevent-unload', preventUnload); |
| 190 | }; |
| 191 | currWin.webContents.on('will-prevent-unload', preventUnload); |
| 192 | currWin.webContents.reload(); |
| 193 | } |
| 194 | |
| 195 | |
| 196 | // Remove auto_update_enabled from configStore on app close or quit |