diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index 183cb30ee..5a6ce4b83 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -9,6 +9,8 @@ import * as log from './logging/log'; export type ConfigKeyType = | 'desktop.announcementGroup' | 'desktop.calling.useWindowsAdm2' + | 'desktop.canResizeLeftPane.beta' + | 'desktop.canResizeLeftPane.production' | 'desktop.clientExpiration' | 'desktop.disableGV1' | 'desktop.groupCallOutboundRing' diff --git a/ts/state/smart/LeftPane.tsx b/ts/state/smart/LeftPane.tsx index ca7753870..986bb4093 100644 --- a/ts/state/smart/LeftPane.tsx +++ b/ts/state/smart/LeftPane.tsx @@ -9,6 +9,7 @@ import type { PropsType as LeftPanePropsType } from '../../components/LeftPane'; import { LeftPane, LeftPaneMode } from '../../components/LeftPane'; import type { StateType } from '../reducer'; import { missingCaseError } from '../../util/missingCaseError'; +import { isAlpha, isBeta } from '../../util/version'; import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums'; import { @@ -163,12 +164,19 @@ const getModeSpecificProps = ( } }; +const canResizeLeftPane = () => + window.Signal.RemoteConfig.isEnabled('desktop.internalUser') || + isAlpha(window.getVersion()) || + isBeta(window.getVersion()) + ? window.Signal.RemoteConfig.isEnabled('desktop.canResizeLeftPane.beta') + : window.Signal.RemoteConfig.isEnabled( + 'desktop.canResizeLeftPane.production' + ); + const mapStateToProps = (state: StateType) => { return { modeSpecificProps: getModeSpecificProps(state), - canResizeLeftPane: window.Signal.RemoteConfig.isEnabled( - 'desktop.internalUser' - ), + canResizeLeftPane: canResizeLeftPane(), preferredWidthFromStorage: getPreferredLeftPaneWidth(state), selectedConversationId: getSelectedConversationId(state), selectedMessageId: getSelectedMessage(state)?.id,