Changed version checking code for native window and correctly support frameless on Windows 8 (#1829)
This commit is contained in:
@@ -24,6 +24,7 @@ import {UPDATE_TEAMS, GET_CONFIGURATION, UPDATE_CONFIGURATION, GET_LOCAL_CONFIGU
|
||||
|
||||
import * as Validator from 'main/Validator';
|
||||
import {getDefaultTeamWithTabsFromTeam} from 'common/tabs/TabView';
|
||||
import Utils from 'common/utils/util';
|
||||
|
||||
import defaultPreferences, {getDefaultDownloadLocation} from './defaultPreferences';
|
||||
import upgradeConfigData from './upgradePreferences';
|
||||
@@ -57,7 +58,7 @@ export default class Config extends EventEmitter {
|
||||
this.predefinedTeams.push(...buildConfig.defaultTeams.map((team) => getDefaultTeamWithTabsFromTeam(team)));
|
||||
}
|
||||
try {
|
||||
this.useNativeWindow = os.platform() === 'win32' && (parseInt(os.release().split('.')[0], 10) < 10);
|
||||
this.useNativeWindow = os.platform() === 'win32' && !Utils.isVersionGreaterThanOrEqualTo(os.release(), '6.2');
|
||||
} catch {
|
||||
this.useNativeWindow = false;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ function shorten(string: string, max?: number) {
|
||||
return string;
|
||||
}
|
||||
|
||||
function isServerVersionGreaterThanOrEqualTo(currentVersion: string, compareVersion: string): boolean {
|
||||
function isVersionGreaterThanOrEqualTo(currentVersion: string, compareVersion: string): boolean {
|
||||
if (currentVersion === compareVersion) {
|
||||
return true;
|
||||
}
|
||||
@@ -66,5 +66,5 @@ export default {
|
||||
getDisplayBoundaries,
|
||||
runMode,
|
||||
shorten,
|
||||
isServerVersionGreaterThanOrEqualTo,
|
||||
isVersionGreaterThanOrEqualTo,
|
||||
};
|
||||
|
Reference in New Issue
Block a user