From 85e3114afefbcf12c6352bd3f54b9de2d96a3481 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Thu, 17 Feb 2022 17:38:59 +0100 Subject: [PATCH 1/4] Fixed option check for update on startup --- src/screens/Settings/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/screens/Settings/index.tsx b/src/screens/Settings/index.tsx index f910fbe5c2..88e45492de 100644 --- a/src/screens/Settings/index.tsx +++ b/src/screens/Settings/index.tsx @@ -227,7 +227,11 @@ function Settings() { setAddDesktopShortcuts(config.addDesktopShortcuts || false) setAddGamesToStartMenu(config.addStartMenuShortcuts || false) setCustomWinePaths(config.customWinePaths || []) - setCheckForUpdatesOnStartup(config.checkForUpdatesOnStartup || true) + setCheckForUpdatesOnStartup( + config.checkForUpdatesOnStartup !== undefined + ? config.checkForUpdatesOnStartup + : true + ) setTargetExe(config.targetExe || '') setAltLegendaryBin(config.altLegendaryBin || '') setShowUnrealMarket(config.showUnrealMarket || false) From e402830a5d199f358b0cd2d57e9acf593388e361 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Thu, 17 Feb 2022 19:30:32 +0100 Subject: [PATCH 2/4] Fixed review suggestion --- src/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Settings/index.tsx b/src/screens/Settings/index.tsx index 88e45492de..8df0d19233 100644 --- a/src/screens/Settings/index.tsx +++ b/src/screens/Settings/index.tsx @@ -91,7 +91,7 @@ function Settings() { on: checkForUpdatesOnStartup, toggle: toggleCheckForUpdatesOnStartup, setOn: setCheckForUpdatesOnStartup - } = useToggle(false) + } = useToggle(true) const { on: nvidiaPrime, toggle: toggleNvidiaPrime, From fc9cc1d3405765947f1c504d9c1ad987d54c5e57 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Thu, 17 Feb 2022 21:45:16 +0100 Subject: [PATCH 3/4] Removed all unessecary || (or) --- src/screens/Settings/index.tsx | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/screens/Settings/index.tsx b/src/screens/Settings/index.tsx index 8df0d19233..bb88c45cd8 100644 --- a/src/screens/Settings/index.tsx +++ b/src/screens/Settings/index.tsx @@ -194,38 +194,38 @@ function Settings() { 'requestSettings', appName ) - setAutoSyncSaves(config.autoSyncSaves || false) - setUseGameMode(config.useGameMode || false) - setShowFps(config.showFps || false) - setShowOffline(config.offlineMode || false) - setAudioFix(config.audioFix || false) - setShowMangoHud(config.showMangohud || false) + setAutoSyncSaves(config.autoSyncSaves) + setUseGameMode(config.useGameMode) + setShowFps(config.showFps) + setShowOffline(config.offlineMode) + setAudioFix(config.audioFix) + setShowMangoHud(config.showMangohud) setDefaultInstallPath(config.defaultInstallPath) setWineVersion(config.wineVersion) setWinePrefix(config.winePrefix) setWineCrossoverBottle(config.wineCrossoverBottle) setOtherOptions(config.otherOptions) setLauncherArgs(config.launcherArgs) - setUseNvidiaPrime(config.nvidiaPrime || false) + setUseNvidiaPrime(config.nvidiaPrime) setEgsLinkedPath(config.egsLinkedPath || '') setEgsPath(config.egsLinkedPath || '') - setExitToTray(config.exitToTray || false) - setStartInTray(config.startInTray || false) - setDarkTrayIcon(config.darkTrayIcon || false) - setDiscordRPC(config.discordRPC || false) - setAutoInstallDxvk(config.autoInstallDxvk || false) - setAutoInstallVkd3d(config.autoInstallVkd3d || false) - setEnableEsync(config.enableEsync || false) - setEnableFsync(config.enableFsync || false) - setEnableFSR(config.enableFSR || false) + setExitToTray(config.exitToTray) + setStartInTray(config.startInTray ) + setDarkTrayIcon(config.darkTrayIcon) + setDiscordRPC(config.discordRPC) + setAutoInstallDxvk(config.autoInstallDxvk) + setAutoInstallVkd3d(config.autoInstallVkd3d) + setEnableEsync(config.enableEsync) + setEnableFsync(config.enableFsync) + setEnableFSR(config.enableFSR) setFsrSharpness(config.maxSharpness || 2) - setResizableBar(config.enableResizableBar || false) + setResizableBar(config.enableResizableBar) setSavesPath(config.savesPath || '') setMaxWorkers(config.maxWorkers ?? 0) setMaxRecentGames(config.maxRecentGames ?? 5) setCustomWinePaths(config.customWinePaths || []) - setAddDesktopShortcuts(config.addDesktopShortcuts || false) - setAddGamesToStartMenu(config.addStartMenuShortcuts || false) + setAddDesktopShortcuts(config.addDesktopShortcuts) + setAddGamesToStartMenu(config.addStartMenuShortcuts) setCustomWinePaths(config.customWinePaths || []) setCheckForUpdatesOnStartup( config.checkForUpdatesOnStartup !== undefined @@ -234,7 +234,7 @@ function Settings() { ) setTargetExe(config.targetExe || '') setAltLegendaryBin(config.altLegendaryBin || '') - setShowUnrealMarket(config.showUnrealMarket || false) + setShowUnrealMarket(config.showUnrealMarket) setDefaultWinePrefix(config.defaultWinePrefix) if (!isDefault) { From f78fb378f0b563eca6124e900313d4d026133348 Mon Sep 17 00:00:00 2001 From: Nocccer Date: Thu, 17 Feb 2022 21:52:49 +0100 Subject: [PATCH 4/4] lint fix --- src/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Settings/index.tsx b/src/screens/Settings/index.tsx index bb88c45cd8..00fcbe1bf6 100644 --- a/src/screens/Settings/index.tsx +++ b/src/screens/Settings/index.tsx @@ -210,7 +210,7 @@ function Settings() { setEgsLinkedPath(config.egsLinkedPath || '') setEgsPath(config.egsLinkedPath || '') setExitToTray(config.exitToTray) - setStartInTray(config.startInTray ) + setStartInTray(config.startInTray) setDarkTrayIcon(config.darkTrayIcon) setDiscordRPC(config.discordRPC) setAutoInstallDxvk(config.autoInstallDxvk)