diff options
Diffstat (limited to 'src/screens/Messages/Conversation')
-rw-r--r-- | src/screens/Messages/Conversation/MessageListError.tsx | 4 | ||||
-rw-r--r-- | src/screens/Messages/Conversation/index.tsx | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/screens/Messages/Conversation/MessageListError.tsx b/src/screens/Messages/Conversation/MessageListError.tsx index 523788d4d..7c6fd02c1 100644 --- a/src/screens/Messages/Conversation/MessageListError.tsx +++ b/src/screens/Messages/Conversation/MessageListError.tsx @@ -18,10 +18,10 @@ export function MessageListError({ const {_} = useLingui() const message = React.useMemo(() => { return { - [ConvoItemError.HistoryFailed]: _(msg`Failed to load past messages.`), - [ConvoItemError.ResumeFailed]: _( + [ConvoItemError.Network]: _( msg`There was an issue connecting to the chat.`, ), + [ConvoItemError.HistoryFailed]: _(msg`Failed to load past messages.`), [ConvoItemError.PollFailed]: _( msg`This chat was disconnected due to a network error.`, ), diff --git a/src/screens/Messages/Conversation/index.tsx b/src/screens/Messages/Conversation/index.tsx index 11044c213..2a4f14a5e 100644 --- a/src/screens/Messages/Conversation/index.tsx +++ b/src/screens/Messages/Conversation/index.tsx @@ -18,6 +18,7 @@ import {PreviewableUserAvatar} from 'view/com/util/UserAvatar' import {CenteredView} from 'view/com/util/Views' import {MessagesList} from '#/screens/Messages/Conversation/MessagesList' import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {Button, ButtonText} from '#/components/Button' import {ConvoMenu} from '#/components/dms/ConvoMenu' import {ListMaybePlaceholder} from '#/components/Lists' import {Text} from '#/components/Typography' @@ -51,8 +52,21 @@ function Inner() { } if (chat.status === ConvoStatus.Error) { - // TODO error - return null + // TODO + return ( + <View> + <CenteredView style={{flex: 1}} sideBorders> + <Text>Something went wrong</Text> + <Button + label="Retry" + onPress={() => { + chat.error.retry() + }}> + <ButtonText>Retry</ButtonText> + </Button> + </CenteredView> + </View> + ) } /* |