Add "can resize left pane" feature flags
This commit is contained in:
parent
cd91ed6f45
commit
6313b05da7
2 changed files with 13 additions and 3 deletions
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue