chore: remove deprecated systemPreferences methods (#26849)

This commit is contained in:
Milan Burda 2020-12-16 00:34:24 +01:00 committed by GitHub
parent 6ccebdf712
commit 6932e17088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 50 deletions

View file

@ -1,4 +1,3 @@
import { deprecate } from 'electron/main';
const { systemPreferences } = process._linkedBinding('electron_browser_system_preferences');
if ('getAppLevelAppearance' in systemPreferences) {
@ -17,20 +16,4 @@ if ('getEffectiveAppearance' in systemPreferences) {
});
}
systemPreferences.isDarkMode = deprecate.moveAPI(
systemPreferences.isDarkMode,
'systemPreferences.isDarkMode()',
'nativeTheme.shouldUseDarkColors'
);
systemPreferences.isInvertedColorScheme = deprecate.moveAPI(
systemPreferences.isInvertedColorScheme,
'systemPreferences.isInvertedColorScheme()',
'nativeTheme.shouldUseInvertedColorScheme'
);
systemPreferences.isHighContrastColorScheme = deprecate.moveAPI(
systemPreferences.isHighContrastColorScheme,
'systemPreferences.isHighContrastColorScheme()',
'nativeTheme.shouldUseHighContrastColors'
);
export default systemPreferences;