Delete for everyone: Track sends and show failure states

This commit is contained in:
Scott Nonnenberg
2022-03-04 11:22:31 -08:00
committed by GitHub
parent 688cca1806
commit 0a52318be6
24 changed files with 426 additions and 60 deletions

View File

@@ -61,7 +61,9 @@ export const MessageMetadata: FunctionComponent<PropsType> = props => {
if (isError || isPartiallySent || isPaused) {
let statusInfo: React.ReactChild;
if (isError) {
statusInfo = i18n('sendFailed');
statusInfo = deletedForEveryone
? i18n('deleteFailed')
: i18n('sendFailed');
} else if (isPaused) {
statusInfo = i18n('sendPaused');
} else {
@@ -76,7 +78,9 @@ export const MessageMetadata: FunctionComponent<PropsType> = props => {
showMessageDetail(id);
}}
>
{i18n('partiallySent')}
{deletedForEveryone
? i18n('partiallyDeleted')
: i18n('partiallySent')}
</button>
);
}
@@ -136,7 +140,7 @@ export const MessageMetadata: FunctionComponent<PropsType> = props => {
<Spinner svgSize="small" size="14px" direction={direction} />
</div>
) : null}
{!deletedForEveryone &&
{(!deletedForEveryone || status === 'sending') &&
!textPending &&
direction === 'outgoing' &&
status !== 'error' &&