signal-desktop/ts/test-both/helpers/defaultComposerStates.ts

38 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-03-04 19:48:44 +00:00
// Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { ComposerStep } from '../../state/ducks/conversationsEnums';
import { OneTimeModalState } from '../../groups/toggleSelectedContactForGroupAddition';
export const defaultStartDirectConversationComposerState = {
step: ComposerStep.StartDirectConversation as const,
searchTerm: '',
2021-11-12 01:17:29 +00:00
isFetchingUsername: false,
};
export const defaultChooseGroupMembersComposerState = {
step: ComposerStep.ChooseGroupMembers as const,
searchTerm: '',
groupAvatar: undefined,
groupName: '',
groupExpireTimer: 0,
maximumGroupSizeModalState: OneTimeModalState.NeverShown,
recommendedGroupSizeModalState: OneTimeModalState.NeverShown,
selectedConversationIds: [],
userAvatarData: [],
};
export const defaultSetGroupMetadataComposerState = {
step: ComposerStep.SetGroupMetadata as const,
isEditingAvatar: false,
groupAvatar: undefined,
groupName: '',
groupExpireTimer: 0,
maximumGroupSizeModalState: OneTimeModalState.NeverShown,
recommendedGroupSizeModalState: OneTimeModalState.NeverShown,
selectedConversationIds: [],
userAvatarData: [],
isCreating: false as const,
hasError: false as const,
};