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 =
|
export type ConfigKeyType =
|
||||||
| 'desktop.announcementGroup'
|
| 'desktop.announcementGroup'
|
||||||
| 'desktop.calling.useWindowsAdm2'
|
| 'desktop.calling.useWindowsAdm2'
|
||||||
|
| 'desktop.canResizeLeftPane.beta'
|
||||||
|
| 'desktop.canResizeLeftPane.production'
|
||||||
| 'desktop.clientExpiration'
|
| 'desktop.clientExpiration'
|
||||||
| 'desktop.disableGV1'
|
| 'desktop.disableGV1'
|
||||||
| 'desktop.groupCallOutboundRing'
|
| 'desktop.groupCallOutboundRing'
|
||||||
|
|
|
@ -9,6 +9,7 @@ import type { PropsType as LeftPanePropsType } from '../../components/LeftPane';
|
||||||
import { LeftPane, LeftPaneMode } from '../../components/LeftPane';
|
import { LeftPane, LeftPaneMode } from '../../components/LeftPane';
|
||||||
import type { StateType } from '../reducer';
|
import type { StateType } from '../reducer';
|
||||||
import { missingCaseError } from '../../util/missingCaseError';
|
import { missingCaseError } from '../../util/missingCaseError';
|
||||||
|
import { isAlpha, isBeta } from '../../util/version';
|
||||||
|
|
||||||
import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums';
|
import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums';
|
||||||
import {
|
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) => {
|
const mapStateToProps = (state: StateType) => {
|
||||||
return {
|
return {
|
||||||
modeSpecificProps: getModeSpecificProps(state),
|
modeSpecificProps: getModeSpecificProps(state),
|
||||||
canResizeLeftPane: window.Signal.RemoteConfig.isEnabled(
|
canResizeLeftPane: canResizeLeftPane(),
|
||||||
'desktop.internalUser'
|
|
||||||
),
|
|
||||||
preferredWidthFromStorage: getPreferredLeftPaneWidth(state),
|
preferredWidthFromStorage: getPreferredLeftPaneWidth(state),
|
||||||
selectedConversationId: getSelectedConversationId(state),
|
selectedConversationId: getSelectedConversationId(state),
|
||||||
selectedMessageId: getSelectedMessage(state)?.id,
|
selectedMessageId: getSelectedMessage(state)?.id,
|
||||||
|
|
Loading…
Reference in a new issue