mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
fix: ensure both values are passed to object to prevent false outcome
This commit is contained in:
parent
36813d5f86
commit
0d68851cf4
4
src/renderer/src/declaration.d.ts
vendored
4
src/renderer/src/declaration.d.ts
vendored
@ -115,8 +115,8 @@ declare global {
|
||||
preferences: Partial<UserPreferences>
|
||||
) => Promise<void>;
|
||||
autoLaunch: (autoLaunchProps: {
|
||||
enabled?: boolean;
|
||||
minimized?: boolean;
|
||||
enabled: boolean;
|
||||
minimized: boolean;
|
||||
}) => Promise<void>;
|
||||
authenticateRealDebrid: (apiToken: string) => Promise<RealDebridUser>;
|
||||
|
||||
|
@ -60,7 +60,10 @@ export function SettingsBehavior() {
|
||||
label={t("launch_with_system")}
|
||||
onChange={() => {
|
||||
handleChange({ runAtStartup: !form.runAtStartup });
|
||||
window.electron.autoLaunch({ enabled: !form.runAtStartup });
|
||||
window.electron.autoLaunch({
|
||||
enabled: !form.runAtStartup,
|
||||
minimized: form.startMinimized,
|
||||
});
|
||||
}}
|
||||
checked={form.runAtStartup}
|
||||
/>
|
||||
@ -75,7 +78,10 @@ export function SettingsBehavior() {
|
||||
disabled={!form.runAtStartup}
|
||||
onChange={() => {
|
||||
handleChange({ startMinimized: !form.startMinimized });
|
||||
window.electron.autoLaunch({ minimized: !form.startMinimized });
|
||||
window.electron.autoLaunch({
|
||||
minimized: !form.startMinimized,
|
||||
enabled: form.runAtStartup,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user