···7import {isWeb} from 'platform/detection'
8import {MessageInput} from '#/screens/Messages/Conversation/MessageInput'
9import {MessageItem} from '#/screens/Messages/Conversation/MessageItem'
010import {Loader} from '#/components/Loader'
11import {Text} from '#/components/Typography'
12···31 return <Text>Deleted message</Text>
32 } else if (item.type === 'pending-message') {
33 return <Text>{item.message.text}</Text>
0000000034 }
3536 return null
···7import {isWeb} from 'platform/detection'
8import {MessageInput} from '#/screens/Messages/Conversation/MessageInput'
9import {MessageItem} from '#/screens/Messages/Conversation/MessageItem'
10+import {Button, ButtonText} from '#/components/Button'
11import {Loader} from '#/components/Loader'
12import {Text} from '#/components/Typography'
13···32 return <Text>Deleted message</Text>
33 } else if (item.type === 'pending-message') {
34 return <Text>{item.message.text}</Text>
35+ } else if (item.type === 'pending-retry') {
36+ return (
37+ <View>
38+ <Button label="Retry" onPress={item.retry}>
39+ <ButtonText>Retry</ButtonText>
40+ </Button>
41+ </View>
42+ )
43 }
4445 return null
-38
src/state/messages/__tests__/client.test.ts
···1-import {describe, it} from '@jest/globals'
2-3-describe(`#/state/dms/client`, () => {
4- describe(`ChatsService`, () => {
5- describe(`unread count`, () => {
6- it.todo(`marks a chat as read, decrements total unread count`)
7- })
8-9- describe(`log processing`, () => {
10- /*
11- * We receive a new chat log AND messages for it in the same batch. We
12- * need to first initialize the chat, then process the received logs.
13- */
14- describe(`handles new chats and subsequent messages received in same log batch`, () => {
15- it.todo(`receives new chat and messages`)
16- it.todo(
17- `receives new chat, new messages come in while still initializing new chat`,
18- )
19- })
20- })
21-22- describe(`reset state`, () => {
23- it.todo(`after period of inactivity, rehydrates entirely fresh state`)
24- })
25- })
26-27- describe(`ChatService`, () => {
28- describe(`history fetching`, () => {
29- it.todo(`fetches initial chat history`)
30- it.todo(`fetches additional chat history`)
31- it.todo(`handles history fetch failure`)
32- })
33-34- describe(`optimistic updates`, () => {
35- it.todo(`adds sending messages`)
36- })
37- })
38-})