Cleanup RemoteConfig

This commit is contained in:
Fedor Indutny 2023-12-08 00:59:54 +01:00 committed by GitHub
parent 7bad05f5a0
commit b2a3605d77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 121 additions and 614 deletions

View file

@ -12,7 +12,6 @@ import { getMe, getConversationSelector } from '../selectors/conversations';
import { getActiveCall } from '../ducks/calling';
import type { ConversationType } from '../ducks/conversations';
import { getIncomingCall } from '../selectors/calling';
import { isGroupCallOutboundRingEnabled } from '../../util/isGroupCallOutboundRingEnabled';
import { isGroupCallRaiseHandEnabled } from '../../util/isGroupCallRaiseHandEnabled';
import { isGroupCallReactionsEnabled } from '../../util/isGroupCallReactionsEnabled';
import type {
@ -375,7 +374,6 @@ const mapStateToProps = (state: StateType) => {
getGroupCallVideoFrameSource,
getPreferredBadge: getPreferredBadgeSelector(state),
i18n: getIntl(state),
isGroupCallOutboundRingEnabled: isGroupCallOutboundRingEnabled(),
isGroupCallRaiseHandEnabled: isGroupCallRaiseHandEnabled(),
isGroupCallReactionsEnabled: isGroupCallReactionsEnabled(),
incomingCall,

View file

@ -48,11 +48,7 @@ import {
getRecentStickers,
} from '../selectors/stickers';
import { isSignalConversation } from '../../util/isSignalConversation';
import {
getComposerStateForConversationIdSelector,
getIsFormattingFlagEnabled,
getIsFormattingSpoilersFlagEnabled,
} from '../selectors/composer';
import { getComposerStateForConversationIdSelector } from '../selectors/composer';
import type { SmartCompositionRecordingProps } from './CompositionRecording';
import { SmartCompositionRecording } from './CompositionRecording';
import type { SmartCompositionRecordingDraftProps } from './CompositionRecordingDraft';
@ -131,9 +127,6 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
const selectedMessageIds = getSelectedMessageIds(state);
const isFormattingEnabled = getTextFormattingEnabled(state);
const isFormattingFlagEnabled = getIsFormattingFlagEnabled(state);
const isFormattingSpoilersFlagEnabled =
getIsFormattingSpoilersFlagEnabled(state);
const lastEditableMessageId = getLastEditableMessageId(state);
@ -152,8 +145,6 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
i18n: getIntl(state),
isDisabled,
isFormattingEnabled,
isFormattingFlagEnabled,
isFormattingSpoilersFlagEnabled,
lastEditableMessageId,
messageCompositionId,
platform,

View file

@ -10,10 +10,6 @@ import { useActions as useEmojiActions } from '../ducks/emojis';
import { useItemsActions } from '../ducks/items';
import { getPreferredBadgeSelector } from '../selectors/badges';
import { useComposerActions } from '../ducks/composer';
import {
getIsFormattingFlagEnabled,
getIsFormattingSpoilersFlagEnabled,
} from '../selectors/composer';
import { getTextFormattingEnabled } from '../selectors/items';
export type SmartCompositionTextAreaProps = Pick<
@ -42,10 +38,6 @@ export function SmartCompositionTextArea(
const getPreferredBadge = useSelector(getPreferredBadgeSelector);
const isFormattingEnabled = useSelector(getTextFormattingEnabled);
const isFormattingFlagEnabled = useSelector(getIsFormattingFlagEnabled);
const isFormattingSpoilersFlagEnabled = useSelector(
getIsFormattingSpoilersFlagEnabled
);
return (
<CompositionTextArea
@ -53,8 +45,6 @@ export function SmartCompositionTextArea(
getPreferredBadge={getPreferredBadge}
i18n={i18n}
isFormattingEnabled={isFormattingEnabled}
isFormattingFlagEnabled={isFormattingFlagEnabled}
isFormattingSpoilersFlagEnabled={isFormattingSpoilersFlagEnabled}
onPickEmoji={onPickEmoji}
onSetSkinTone={onSetSkinTone}
onTextTooLong={onTextTooLong}

View file

@ -14,10 +14,6 @@ import {
getKnownStickerPacks,
getReceivedStickerPacks,
} from '../selectors/stickers';
import {
getIsFormattingFlagEnabled,
getIsFormattingSpoilersFlagEnabled,
} from '../selectors/composer';
const mapStateToProps = (state: StateType) => {
const blessedPacks = getBlessedStickerPacks(state);
@ -25,10 +21,6 @@ const mapStateToProps = (state: StateType) => {
const knownPacks = getKnownStickerPacks(state);
const receivedPacks = getReceivedStickerPacks(state);
const isFormattingFlagEnabled = getIsFormattingFlagEnabled(state);
const isFormattingSpoilersFlagEnabled =
getIsFormattingSpoilersFlagEnabled(state);
const hasInstalledStickers =
countStickers({
knownPacks,
@ -41,8 +33,6 @@ const mapStateToProps = (state: StateType) => {
return {
hasInstalledStickers,
isFormattingFlagEnabled,
isFormattingSpoilersFlagEnabled,
platform,
i18n: getIntl(state),
};

View file

@ -23,10 +23,6 @@ import {
getRecentStickers,
} from '../selectors/stickers';
import { getAddStoryData } from '../selectors/stories';
import {
getIsFormattingFlagEnabled,
getIsFormattingSpoilersFlagEnabled,
} from '../selectors/composer';
import { getLinkPreview } from '../selectors/linkPreviews';
import { getPreferredBadgeSelector } from '../selectors/badges';
import {
@ -108,10 +104,6 @@ export function SmartStoryCreator(): JSX.Element | null {
const { onUseEmoji: onPickEmoji } = useEmojisActions();
const isFormattingEnabled = useSelector(getTextFormattingEnabled);
const isFormattingFlagEnabled = useSelector(getIsFormattingFlagEnabled);
const isFormattingSpoilersFlagEnabled = useSelector(
getIsFormattingSpoilersFlagEnabled
);
const platform = useSelector(getPlatform);
return (
@ -128,8 +120,6 @@ export function SmartStoryCreator(): JSX.Element | null {
imageToBlurHash={imageToBlurHash}
installedPacks={installedPacks}
isFormattingEnabled={isFormattingEnabled}
isFormattingFlagEnabled={isFormattingFlagEnabled}
isFormattingSpoilersFlagEnabled={isFormattingSpoilersFlagEnabled}
isSending={isSending}
linkPreview={linkPreviewForSource(LinkPreviewSourceType.StoryCreator)}
me={me}

View file

@ -40,10 +40,6 @@ import { useAudioPlayerActions } from '../ducks/audioPlayer';
import { useGlobalModalActions } from '../ducks/globalModals';
import { useStoriesActions } from '../ducks/stories';
import { useIsWindowActive } from '../../hooks/useIsWindowActive';
import {
getIsFormattingFlagEnabled,
getIsFormattingSpoilersFlagEnabled,
} from '../selectors/composer';
export function SmartStoryViewer(): JSX.Element | null {
const storiesActions = useStoriesActions();
@ -95,10 +91,6 @@ export function SmartStoryViewer(): JSX.Element | null {
);
const isFormattingEnabled = useSelector(getTextFormattingEnabled);
const isFormattingFlagEnabled = useSelector(getIsFormattingFlagEnabled);
const isFormattingSpoilersFlagEnabled = useSelector(
getIsFormattingSpoilersFlagEnabled
);
const { pauseVoiceNotePlayer } = useAudioPlayerActions();
@ -126,8 +118,6 @@ export function SmartStoryViewer(): JSX.Element | null {
platform={platform}
isInternalUser={internalUser}
isFormattingEnabled={isFormattingEnabled}
isFormattingFlagEnabled={isFormattingFlagEnabled}
isFormattingSpoilersFlagEnabled={isFormattingSpoilersFlagEnabled}
isSignalConversation={isSignalConversation({
id: conversationStory.conversationId,
})}

View file

@ -244,10 +244,7 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
'typingContactIdTimestamps',
]),
isConversationSelected: state.conversations.selectedConversationId === id,
isIncomingMessageRequest: Boolean(
conversation.messageRequestsEnabled &&
!conversation.acceptedMessageRequest
),
isIncomingMessageRequest: Boolean(!conversation.acceptedMessageRequest),
isSomeoneTyping: Boolean(
Object.keys(conversation.typingContactIdTimestamps ?? {}).length > 0
),