2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
2021-08-16 14:33:27 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2021-11-01 19:13:35 +00:00
|
|
|
import { ComposerStep } from '../../state/ducks/conversationsEnums';
|
2021-08-16 14:33:27 +00:00
|
|
|
import { OneTimeModalState } from '../../groups/toggleSelectedContactForGroupAddition';
|
2022-11-16 20:18:02 +00:00
|
|
|
import { DurationInSeconds } from '../../util/durations';
|
2021-08-16 14:33:27 +00:00
|
|
|
|
|
|
|
export const defaultStartDirectConversationComposerState = {
|
|
|
|
step: ComposerStep.StartDirectConversation as const,
|
|
|
|
searchTerm: '',
|
2022-04-05 00:38:22 +00:00
|
|
|
uuidFetchState: {},
|
2021-08-16 14:33:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const defaultChooseGroupMembersComposerState = {
|
|
|
|
step: ComposerStep.ChooseGroupMembers as const,
|
|
|
|
searchTerm: '',
|
2022-04-05 00:38:22 +00:00
|
|
|
uuidFetchState: {},
|
2021-08-16 14:33:27 +00:00
|
|
|
groupAvatar: undefined,
|
|
|
|
groupName: '',
|
2022-11-16 20:18:02 +00:00
|
|
|
groupExpireTimer: DurationInSeconds.ZERO,
|
2021-08-16 14:33:27 +00:00
|
|
|
maximumGroupSizeModalState: OneTimeModalState.NeverShown,
|
|
|
|
recommendedGroupSizeModalState: OneTimeModalState.NeverShown,
|
|
|
|
selectedConversationIds: [],
|
|
|
|
userAvatarData: [],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const defaultSetGroupMetadataComposerState = {
|
|
|
|
step: ComposerStep.SetGroupMetadata as const,
|
|
|
|
isEditingAvatar: false,
|
|
|
|
groupAvatar: undefined,
|
|
|
|
groupName: '',
|
2022-11-16 20:18:02 +00:00
|
|
|
groupExpireTimer: DurationInSeconds.ZERO,
|
2021-08-16 14:33:27 +00:00
|
|
|
maximumGroupSizeModalState: OneTimeModalState.NeverShown,
|
|
|
|
recommendedGroupSizeModalState: OneTimeModalState.NeverShown,
|
|
|
|
selectedConversationIds: [],
|
|
|
|
userAvatarData: [],
|
|
|
|
isCreating: false as const,
|
|
|
|
hasError: false as const,
|
|
|
|
};
|