mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-09-28 16:09:49 +01:00
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
29 lines
822 B
TypeScript
29 lines
822 B
TypeScript
// Copyright 2025 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import type { ReadonlyDeep } from 'type-fest';
|
|
import { type ConfigMapType } from '../RemoteConfig.dom.ts';
|
|
import {
|
|
isFeaturedEnabledNoRedux,
|
|
isFeaturedEnabledSelector,
|
|
} from './isFeatureEnabled.dom.ts';
|
|
|
|
export function isLocalBackupsEnabled(reduxArgs?: {
|
|
currentVersion: string;
|
|
remoteConfig: ReadonlyDeep<ConfigMapType> | undefined;
|
|
}): boolean {
|
|
if (reduxArgs) {
|
|
return isFeaturedEnabledSelector({
|
|
currentVersion: reduxArgs.currentVersion,
|
|
remoteConfig: reduxArgs.remoteConfig,
|
|
betaKey: 'desktop.localBackups.beta',
|
|
prodKey: 'desktop.localBackups.prod',
|
|
});
|
|
}
|
|
|
|
return isFeaturedEnabledNoRedux({
|
|
betaKey: 'desktop.localBackups.beta',
|
|
prodKey: 'desktop.localBackups.prod',
|
|
});
|
|
}
|