Disables auto-download updates on Linux

This commit is contained in:
Josh Perez 2021-08-20 17:41:58 -04:00 committed by GitHub
parent 0e2885a5a6
commit 353fea5d66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 9 deletions

View File

@ -118,6 +118,7 @@ const createProps = (): PropsType => ({
),
isAudioNotificationsSupported: true,
isAutoDownloadUpdatesSupported: true,
isAutoLaunchSupported: true,
isHideMenuBarSupported: true,
isNotificationAttentionSupported: true,

View File

@ -96,6 +96,7 @@ export type PropsType = {
// Limited support features
isAudioNotificationsSupported: boolean;
isAutoDownloadUpdatesSupported: boolean;
isAutoLaunchSupported: boolean;
isHideMenuBarSupported: boolean;
isNotificationAttentionSupported: boolean;
@ -184,6 +185,7 @@ export const Preferences = ({
i18n,
initialSpellCheckSetting,
isAudioNotificationsSupported,
isAutoDownloadUpdatesSupported,
isAutoLaunchSupported,
isHideMenuBarSupported,
isPhoneNumberSharingSupported,
@ -344,15 +346,17 @@ export const Preferences = ({
onChange={onMediaCameraPermissionsChange}
/>
</SettingsRow>
<SettingsRow title={i18n('Preferences--updates')}>
<Checkbox
checked={hasAutoDownloadUpdate}
label={i18n('Preferences__download-update')}
moduleClassName="Preferences__checkbox"
name="autoDownloadUpdate"
onChange={onAutoDownloadUpdateChange}
/>
</SettingsRow>
{isAutoDownloadUpdatesSupported && (
<SettingsRow title={i18n('Preferences--updates')}>
<Checkbox
checked={hasAutoDownloadUpdate}
label={i18n('Preferences__download-update')}
moduleClassName="Preferences__checkbox"
name="autoDownloadUpdate"
onChange={onAutoDownloadUpdateChange}
/>
</SettingsRow>
)}
</>
);
} else if (page === Page.Appearance) {

View File

@ -58,3 +58,6 @@ export const getTitleBarVisibility = (): TitleBarVisibility =>
export const isSystemTraySupported = (appVersion: string): boolean =>
// We eventually want to support Linux in production.
OS.isWindows() || (OS.isLinux() && !isProduction(appVersion));
export const isAutoDownloadUpdatesSupported = (): boolean =>
OS.isWindows() || OS.isMacOS();

View File

@ -305,6 +305,7 @@ async function renderPreferences() {
// Limited support features
isAudioNotificationsSupported: Settings.isAudioNotificationSupported(),
isAutoDownloadUpdatesSupported: Settings.isAutoDownloadUpdatesSupported(),
isAutoLaunchSupported: Settings.isAutoLaunchSupported(),
isHideMenuBarSupported: Settings.isHideMenuBarSupported(),
isNotificationAttentionSupported: Settings.isDrawAttentionSupported(),