Use preferenceStore as string instead of boolean

This commit is contained in:
Lynn
2020-10-19 18:00:39 +02:00
parent e0a0c43339
commit 3992f97e4d
2 changed files with 10 additions and 10 deletions

View File

@@ -108,11 +108,11 @@ log.transports.file.resolvePath = (
};
log.info("Main starting");
if (!preferenceStore.get(useHardwareAccelerationKey)) {
log.info('Hardware acceleration disabled');
if (preferenceStore.get(useHardwareAccelerationKey) === "false") {
log.info("Hardware acceleration disabled");
app.disableHardwareAcceleration();
} else {
log.info('Hardware acceleration enabled');
log.info("Hardware acceleration enabled");
}
app.commandLine.appendSwitch("disable-features", "OutOfBlinkCors");
@@ -294,7 +294,7 @@ function createWindow(): BrowserWindow {
e.preventDefault();
win.hide();
if (preferenceStore.get(collapseToTrayKey) === true) {
if (preferenceStore.get(collapseToTrayKey) === "true") {
app.dock.hide();
}
});

View File

@@ -1,8 +1,8 @@
export const ENABLE_SYSTEM_NOTIFICATIONS_PREFERENCE_KEY =
"enable_system_notifications";
export const collapseToTrayKey = 'collapse_to_tray';
export const wowupReleaseChannelKey = 'wowup_release_channel';
export const defaultChannelKeySuffix = '_default_addon_channel';
export const defaultAutoUpdateKeySuffix = '_default_auto_update';
export const lastSelectedWowClientTypeKey = 'last_selected_client_type';
export const useHardwareAccelerationKey = 'use_hardware_acceleration';
export const collapseToTrayKey = "collapse_to_tray";
export const wowupReleaseChannelKey = "wowup_release_channel";
export const defaultChannelKeySuffix = "_default_addon_channel";
export const defaultAutoUpdateKeySuffix = "_default_auto_update";
export const lastSelectedWowClientTypeKey = "last_selected_client_type";
export const useHardwareAccelerationKey = "use_hardware_acceleration";