Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

fix: unconditional launch at login registry sync with explicit exe path and hidden flag

Deepender25afb66cd55091
diff --git a/electron/main/ipc.ts b/electron/main/ipc.ts
index 1c10055..72162ad 100644
--- a/electron/main/ipc.ts
+++ b/electron/main/ipc.ts
@@ -177,24 +177,20 @@ export function syncLoginItemSettings(launchAtLogin?: boolean): void {
if (!app.isPackaged) return
const wantLaunch = launchAtLogin ?? loadSettings().launchAtLogin
try {
- const current = app.getLoginItemSettings()
const exePath = app.getPath('exe')
-
if (wantLaunch) {
- if (!current.openAtLogin || current.executableWillLaunchAtLogin === false) {
- app.setLoginItemSettings({
- openAtLogin: true,
- path: exePath,
- args: ['--hidden']
- })
- }
+ app.setLoginItemSettings({
+ openAtLogin: true,
+ path: exePath,
+ args: ['--hidden'],
+ name: 'Edge-Drop'
+ })
} else {
- if (current.openAtLogin) {
- app.setLoginItemSettings({
- openAtLogin: false,
- path: exePath
- })
- }
+ app.setLoginItemSettings({
+ openAtLogin: false,
+ path: exePath,
+ name: 'Edge-Drop'
+ })
}
} catch (err) {
console.error('[IPC] Failed to sync login item settings:', err)