mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor ternary to if statement in window-manager, update constant definitions for better clarity
This commit is contained in:
parent
94b7c8aefe
commit
315d03ae69
6 changed files with 18 additions and 12 deletions
|
@ -51,11 +51,14 @@ export class WindowManager {
|
|||
this.mainWindow.removeMenu();
|
||||
|
||||
const userPreferences = await userPreferencesRepository.findOne({
|
||||
where: {id: 1},
|
||||
where: { id: 1 },
|
||||
});
|
||||
|
||||
this.mainWindow.on("close", () => {
|
||||
userPreferences?.quitInXButtonEnabled ? app.quit() : WindowManager.mainWindow?.setProgressBar(-1);
|
||||
if (userPreferences?.preferQuitInsteadOfHiding) {
|
||||
app.quit();
|
||||
}
|
||||
WindowManager.mainWindow?.setProgressBar(-1);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue