Revert "feat: Add start as minimized toggle to settings (#248)" (#310)

the current implementation was prematurely merged and is broken. it will be back with a fixed implementaton eventually
This commit is contained in:
V 2023-12-28 04:25:54 +01:00 committed by GitHub
parent 7565eb39a4
commit 2f35128acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 15 deletions

View file

@ -442,8 +442,7 @@ function createMainWindow() {
const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "vencordDesktopMain.js")));
export async function createWindows() {
const { startMinimized } = Settings.store;
const splash = createSplashWindow(startMinimized);
const splash = createSplashWindow();
// SteamOS letterboxes and scales it terribly, so just full screen it
if (isDeckGameMode) splash.setFullScreen(true);
await ensureVencordFiles();
@ -453,8 +452,11 @@ export async function createWindows() {
mainWin.webContents.on("did-finish-load", () => {
splash.destroy();
mainWin!.show();
if (!startMinimized || isDeckGameMode) mainWin!.show();
if (Settings.store.maximized && !isDeckGameMode) {
mainWin!.maximize();
}
if (isDeckGameMode) {
// always use entire display
@ -464,11 +466,5 @@ export async function createWindows() {
}
});
mainWin.once("show", () => {
if (Settings.store.maximized && !mainWin!.isMaximized() && !isDeckGameMode) {
mainWin!.maximize();
}
});
initArRPC();
}

View file

@ -11,11 +11,10 @@ import { ICON_PATH, VIEW_DIR } from "shared/paths";
import { Settings } from "./settings";
export function createSplashWindow(startMinimized = false) {
export function createSplashWindow() {
const splash = new BrowserWindow({
...SplashProps,
icon: ICON_PATH,
show: !startMinimized
icon: ICON_PATH
});
splash.loadFile(join(VIEW_DIR, "splash.html"));

View file

@ -49,8 +49,7 @@ export default function SettingsUi() {
"Open Links in app (experimental)",
"Opens links in a new Vesktop window instead of your web browser"
],
["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true],
["startMinimized", "Start minimized", "Vesktop remains in minimized mode on start", false]
["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true]
];
const switches = allSwitches.filter(isTruthy);

View file

@ -19,7 +19,6 @@ export interface Settings {
arRPC?: boolean;
appBadge?: boolean;
discordWindowsTitleBar?: boolean;
startMinimized?: boolean;
maximized?: boolean;
minimized?: boolean;