Revert "Refactor outbound delivery state"
This reverts commit 9c48a95eb5
.
This commit is contained in:
parent
77668c3247
commit
ad217c808d
29 changed files with 694 additions and 3197 deletions
|
@ -9,7 +9,6 @@ import { storiesOf } from '@storybook/react';
|
|||
|
||||
import { PropsData as MessageDataPropsType } from './Message';
|
||||
import { MessageDetail, Props } from './MessageDetail';
|
||||
import { SendStatus } from '../../messages/MessageSendState';
|
||||
import { getDefaultConversation } from '../../test-both/helpers/getDefaultConversation';
|
||||
import { setup as setupI18n } from '../../../js/modules/i18n';
|
||||
import enMessages from '../../../_locales/en/messages.json';
|
||||
|
@ -49,7 +48,7 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Delivered,
|
||||
status: 'delivered',
|
||||
},
|
||||
],
|
||||
errors: overrideProps.errors || [],
|
||||
|
@ -117,7 +116,7 @@ story.add('Message Statuses', () => {
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Sent,
|
||||
status: 'sent',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -126,7 +125,7 @@ story.add('Message Statuses', () => {
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Pending,
|
||||
status: 'sending',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -135,7 +134,7 @@ story.add('Message Statuses', () => {
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Failed,
|
||||
status: 'partial-sent',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -144,7 +143,7 @@ story.add('Message Statuses', () => {
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Delivered,
|
||||
status: 'delivered',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -153,7 +152,7 @@ story.add('Message Statuses', () => {
|
|||
}),
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Read,
|
||||
status: 'read',
|
||||
},
|
||||
],
|
||||
message: {
|
||||
|
@ -210,7 +209,7 @@ story.add('All Errors', () => {
|
|||
}),
|
||||
isOutgoingKeyError: true,
|
||||
isUnidentifiedDelivery: false,
|
||||
status: SendStatus.Failed,
|
||||
status: 'error',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -225,7 +224,7 @@ story.add('All Errors', () => {
|
|||
],
|
||||
isOutgoingKeyError: false,
|
||||
isUnidentifiedDelivery: true,
|
||||
status: SendStatus.Failed,
|
||||
status: 'error',
|
||||
},
|
||||
{
|
||||
...getDefaultConversation({
|
||||
|
@ -234,7 +233,7 @@ story.add('All Errors', () => {
|
|||
}),
|
||||
isOutgoingKeyError: true,
|
||||
isUnidentifiedDelivery: true,
|
||||
status: SendStatus.Failed,
|
||||
status: 'error',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
@ -10,6 +10,7 @@ import { Avatar } from '../Avatar';
|
|||
import { ContactName } from './ContactName';
|
||||
import {
|
||||
Message,
|
||||
MessageStatusType,
|
||||
Props as MessagePropsType,
|
||||
PropsData as MessagePropsDataType,
|
||||
} from './Message';
|
||||
|
@ -17,7 +18,6 @@ import { LocalizerType } from '../../types/Util';
|
|||
import { ConversationType } from '../../state/ducks/conversations';
|
||||
import { assert } from '../../util/assert';
|
||||
import { ContactNameColorType } from '../../types/Colors';
|
||||
import { SendStatus } from '../../messages/MessageSendState';
|
||||
|
||||
export type Contact = Pick<
|
||||
ConversationType,
|
||||
|
@ -33,7 +33,7 @@ export type Contact = Pick<
|
|||
| 'title'
|
||||
| 'unblurredAvatarPath'
|
||||
> & {
|
||||
status: SendStatus | null;
|
||||
status: MessageStatusType | null;
|
||||
|
||||
isOutgoingKeyError: boolean;
|
||||
isUnidentifiedDelivery: boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue