mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 22:06:17 +00:00
Merge branch 'feature/delete-all-dowload-sources' of https://github.com/KelvinDiasMoreira/hydra into feature/delete-all-dowload-sources
This commit is contained in:
@@ -65,25 +65,20 @@ export class WindowManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static async saveScreenConfig({
|
||||
...configScreenWhenClosed
|
||||
}: {
|
||||
x: number | undefined;
|
||||
y: number | undefined;
|
||||
width: number;
|
||||
height: number;
|
||||
isMaximized: boolean;
|
||||
}) {
|
||||
private static async saveScreenConfig(configScreenWhenClosed: ScreenState) {
|
||||
await db.put(levelKeys.screenState, configScreenWhenClosed, {
|
||||
valueEncoding: "json",
|
||||
});
|
||||
}
|
||||
|
||||
private static async loadScreenConfig() {
|
||||
const data = await db.get<string, ScreenState>(levelKeys.screenState, {
|
||||
valueEncoding: "json",
|
||||
});
|
||||
return data ?? {};
|
||||
const data = await db.get<string, ScreenState | undefined>(
|
||||
levelKeys.screenState,
|
||||
{
|
||||
valueEncoding: "json",
|
||||
}
|
||||
);
|
||||
return data ?? { isMaximized: false, height: 720, width: 1200 };
|
||||
}
|
||||
|
||||
private static updateInitialConfig(
|
||||
@@ -194,8 +189,8 @@ export class WindowManager {
|
||||
? {
|
||||
x: undefined,
|
||||
y: undefined,
|
||||
height: this.initialConfigInitializationMainWindow.height!,
|
||||
width: this.initialConfigInitializationMainWindow.width!,
|
||||
height: this.initialConfigInitializationMainWindow.height ?? 720,
|
||||
width: this.initialConfigInitializationMainWindow.width ?? 1200,
|
||||
isMaximized: true,
|
||||
}
|
||||
: { ...lastBounds, isMaximized };
|
||||
@@ -206,6 +201,7 @@ export class WindowManager {
|
||||
if (userPreferences?.preferQuitInsteadOfHiding) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
WindowManager.mainWindow?.setProgressBar(-1);
|
||||
WindowManager.mainWindow = null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user