mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Scope down content protection to Windows 11
This commit is contained in:
@@ -89,6 +89,7 @@ import {
|
||||
import {
|
||||
getDefaultSystemTraySetting,
|
||||
isSystemTraySupported,
|
||||
isContentProtectionEnabledByDefault,
|
||||
} from '../ts/types/Settings';
|
||||
import * as ephemeralConfig from './ephemeral_config';
|
||||
import * as logging from '../ts/logging/main_process_logging';
|
||||
@@ -574,7 +575,10 @@ async function handleCommonWindowEvents(window: BrowserWindow) {
|
||||
const contentProtection = ephemeralConfig.get('contentProtection');
|
||||
// Apply content protection by default on Windows, unless explicitly disabled
|
||||
// by user in settings.
|
||||
if (contentProtection ?? OS.isWindows()) {
|
||||
if (
|
||||
contentProtection ??
|
||||
isContentProtectionEnabledByDefault(OS, os.release())
|
||||
) {
|
||||
window.once('ready-to-show', async () => {
|
||||
window.setContentProtection(true);
|
||||
});
|
||||
|
||||
@@ -76,3 +76,9 @@ export const shouldHideExpiringMessageBody = (
|
||||
OS: OSType,
|
||||
release: string
|
||||
): boolean => OS.isWindows() || (OS.isMacOS() && semver.lt(release, '21.1.0'));
|
||||
|
||||
// Windows 11 and forward
|
||||
export const isContentProtectionEnabledByDefault = (
|
||||
OS: OSType,
|
||||
release: string
|
||||
): boolean => OS.isWindows() && semver.gte(release, '10.0.22000');
|
||||
|
||||
@@ -324,7 +324,12 @@ async function renderPreferences() {
|
||||
hasAutoLaunch,
|
||||
hasCallNotifications,
|
||||
hasCallRingtoneNotification,
|
||||
hasContentProtection,
|
||||
hasContentProtection:
|
||||
hasContentProtection ??
|
||||
Settings.isContentProtectionEnabledByDefault(
|
||||
OS,
|
||||
MinimalSignalContext.config.osRelease
|
||||
),
|
||||
hasCountMutedConversations,
|
||||
hasHideMenuBar,
|
||||
hasIncomingCallNotifications,
|
||||
|
||||
Reference in New Issue
Block a user