name changes

This commit is contained in:
Hachi-R
2024-05-05 20:11:12 -03:00
parent 970a3be280
commit ce5b7a337d
5 changed files with 12 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ export class UserPreferences {
preferQuitInsteadOfHiding: boolean;
@Column("boolean", { default: false })
startWithSystem: boolean;
runAtStartup: boolean;
@CreateDateColumn()
createdAt: Date;

View File

@@ -1,21 +1,18 @@
import { registerEvent } from "../register-event";
import AutoLaunch from "auto-launch";
import { app } from "electron";
const autoLaunch = async (
_event: Electron.IpcMainInvokeEvent,
enabled: boolean
) => {
const appLauncher = new AutoLaunch({
name: "Hydra",
name: app.getName(),
});
if (enabled) {
appLauncher
.enable()
.catch((err) => console.error("Error enabling auto-launch:", err));
appLauncher.enable().catch();
} else {
appLauncher
.disable()
.catch((err) => console.error("Error disabling auto-launch:", err));
appLauncher.disable().catch();
}
};