stream-chat-react-native-core 5.29.1-beta.2 → 5.29.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Channel/Channel.js +14 -19
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +9 -13
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +2 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +1 -3
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +6 -4
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +25 -3
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +13 -11
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +1 -0
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -0
- package/lib/commonjs/i18n/es.json +20 -19
- package/lib/commonjs/i18n/fr.json +20 -19
- package/lib/commonjs/i18n/he.json +20 -19
- package/lib/commonjs/i18n/hi.json +20 -19
- package/lib/commonjs/i18n/it.json +20 -19
- package/lib/commonjs/i18n/ja.json +20 -19
- package/lib/commonjs/i18n/ko.json +20 -19
- package/lib/commonjs/i18n/nl.json +20 -19
- package/lib/commonjs/i18n/pt-BR.json +20 -19
- package/lib/commonjs/i18n/ru.json +20 -19
- package/lib/commonjs/i18n/tr.json +20 -19
- package/lib/commonjs/icons/ChatIcon.js +23 -0
- package/lib/commonjs/icons/ChatIcon.js.map +1 -0
- package/lib/commonjs/icons/index.js +11 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +14 -19
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +9 -13
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +2 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +1 -3
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +6 -4
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +25 -3
- package/lib/module/components/Indicators/EmptyStateIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js +13 -11
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +1 -0
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/i18n/en.json +1 -0
- package/lib/module/i18n/es.json +20 -19
- package/lib/module/i18n/fr.json +20 -19
- package/lib/module/i18n/he.json +20 -19
- package/lib/module/i18n/hi.json +20 -19
- package/lib/module/i18n/it.json +20 -19
- package/lib/module/i18n/ja.json +20 -19
- package/lib/module/i18n/ko.json +20 -19
- package/lib/module/i18n/nl.json +20 -19
- package/lib/module/i18n/pt-BR.json +20 -19
- package/lib/module/i18n/ru.json +20 -19
- package/lib/module/i18n/tr.json +20 -19
- package/lib/module/icons/ChatIcon.js +23 -0
- package/lib/module/icons/ChatIcon.js.map +1 -0
- package/lib/module/icons/index.js +11 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/utils.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/EmptyStateIndicator.d.ts +1 -1
- package/lib/typescript/components/Indicators/EmptyStateIndicator.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +1 -0
- package/lib/typescript/i18n/es.json +20 -19
- package/lib/typescript/i18n/fr.json +20 -19
- package/lib/typescript/i18n/he.json +20 -19
- package/lib/typescript/i18n/hi.json +20 -19
- package/lib/typescript/i18n/it.json +20 -19
- package/lib/typescript/i18n/ja.json +20 -19
- package/lib/typescript/i18n/ko.json +20 -19
- package/lib/typescript/i18n/nl.json +20 -19
- package/lib/typescript/i18n/pt-BR.json +20 -19
- package/lib/typescript/i18n/ru.json +20 -19
- package/lib/typescript/i18n/tr.json +20 -19
- package/lib/typescript/icons/ChatIcon.d.ts +4 -0
- package/lib/typescript/icons/ChatIcon.d.ts.map +1 -0
- package/lib/typescript/icons/index.d.ts +1 -0
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/utils/Streami18n.d.ts +1 -0
- package/lib/typescript/utils/Streami18n.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Channel/Channel.tsx +12 -12
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +9 -14
- package/src/components/ChannelList/utils.ts +2 -1
- package/src/components/ChannelPreview/ChannelPreview.tsx +1 -6
- package/src/components/ChannelPreview/hooks/__tests__/useLatestMessagePreview.test.tsx +1 -1
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +6 -13
- package/src/components/Indicators/EmptyStateIndicator.tsx +19 -2
- package/src/components/MessageInput/hooks/useAudioController.tsx +4 -1
- package/src/hooks/useTranslatedMessage.ts +3 -1
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +20 -19
- package/src/i18n/fr.json +20 -19
- package/src/i18n/he.json +20 -19
- package/src/i18n/hi.json +20 -19
- package/src/i18n/it.json +20 -19
- package/src/i18n/ja.json +20 -19
- package/src/i18n/ko.json +20 -19
- package/src/i18n/nl.json +20 -19
- package/src/i18n/pt-BR.json +20 -19
- package/src/i18n/ru.json +20 -19
- package/src/i18n/tr.json +20 -19
- package/src/icons/ChatIcon.tsx +12 -0
- package/src/icons/index.ts +1 -0
- package/src/version.json +1 -1
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "
|
|
8
|
+
"Are you sure?": "",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -19,31 +19,32 @@
|
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
22
|
+
"Error loading": "",
|
|
23
23
|
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Tipo de arquivo não suportado",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "
|
|
31
|
+
"How about sending your first message to a friend?": "",
|
|
32
32
|
"Instant Commands": "",
|
|
33
|
-
"Let's start chatting!": "
|
|
33
|
+
"Let's start chatting!": "",
|
|
34
34
|
"Links are disabled": "",
|
|
35
|
-
"Loading channels...": "
|
|
36
|
-
"Loading messages...": "
|
|
37
|
-
"Loading...": "
|
|
35
|
+
"Loading channels...": "",
|
|
36
|
+
"Loading messages...": "",
|
|
37
|
+
"Loading...": "",
|
|
38
38
|
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
39
|
-
"Message Reactions": "
|
|
39
|
+
"Message Reactions": "",
|
|
40
40
|
"Message deleted": "Mensagem excluída",
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
|
+
"No chats here yet…": "",
|
|
43
44
|
"Not supported": "",
|
|
44
45
|
"Nothing yet...": "",
|
|
45
46
|
"Ok": "",
|
|
46
|
-
"Only visible to you": "",
|
|
47
|
+
"Only visible to you": "Apenas visível para você",
|
|
47
48
|
"Open Settings": "",
|
|
48
49
|
"Photo": "",
|
|
49
50
|
"Photos and Videos": "",
|
|
@@ -52,16 +53,16 @@
|
|
|
52
53
|
"Please allow Audio permissions in settings.": "",
|
|
53
54
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
55
|
"Please select a channel first": "",
|
|
55
|
-
"Reconnecting...": "
|
|
56
|
+
"Reconnecting...": "",
|
|
56
57
|
"Reply": "",
|
|
57
|
-
"Reply to Message": "
|
|
58
|
+
"Reply to Message": "",
|
|
58
59
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "
|
|
60
|
+
"Search GIFs": "",
|
|
60
61
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "
|
|
62
|
-
"Send a message": "
|
|
62
|
+
"Send Anyway": "",
|
|
63
|
+
"Send a message": "",
|
|
63
64
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "
|
|
65
|
+
"Slow mode ON": "",
|
|
65
66
|
"The message has been reported to a moderator.": "",
|
|
66
67
|
"Thread Reply": "",
|
|
67
68
|
"Unblock User": "",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"Unpin from Conversation": "",
|
|
71
72
|
"Unread Messages": "Mensagens não lidas",
|
|
72
73
|
"Video": "",
|
|
73
|
-
"You": "
|
|
74
|
+
"You": "",
|
|
74
75
|
"You can't send messages in this channel": "",
|
|
75
76
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
76
77
|
"{{ index }} of {{ photoLength }}": "",
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "
|
|
8
|
+
"Are you sure?": "",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -19,31 +19,32 @@
|
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
22
|
+
"Error loading": "",
|
|
23
23
|
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Тип файла не поддерживается",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "
|
|
31
|
+
"How about sending your first message to a friend?": "",
|
|
32
32
|
"Instant Commands": "",
|
|
33
|
-
"Let's start chatting!": "
|
|
33
|
+
"Let's start chatting!": "",
|
|
34
34
|
"Links are disabled": "",
|
|
35
|
-
"Loading channels...": "
|
|
36
|
-
"Loading messages...": "
|
|
37
|
-
"Loading...": "
|
|
35
|
+
"Loading channels...": "",
|
|
36
|
+
"Loading messages...": "",
|
|
37
|
+
"Loading...": "",
|
|
38
38
|
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
39
|
-
"Message Reactions": "
|
|
39
|
+
"Message Reactions": "",
|
|
40
40
|
"Message deleted": "Сообщение удалено",
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
|
+
"No chats here yet…": "",
|
|
43
44
|
"Not supported": "",
|
|
44
45
|
"Nothing yet...": "",
|
|
45
46
|
"Ok": "",
|
|
46
|
-
"Only visible to you": "",
|
|
47
|
+
"Only visible to you": "Видно только вам",
|
|
47
48
|
"Open Settings": "",
|
|
48
49
|
"Photo": "",
|
|
49
50
|
"Photos and Videos": "",
|
|
@@ -52,16 +53,16 @@
|
|
|
52
53
|
"Please allow Audio permissions in settings.": "",
|
|
53
54
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
55
|
"Please select a channel first": "",
|
|
55
|
-
"Reconnecting...": "
|
|
56
|
+
"Reconnecting...": "",
|
|
56
57
|
"Reply": "",
|
|
57
|
-
"Reply to Message": "
|
|
58
|
+
"Reply to Message": "",
|
|
58
59
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "
|
|
60
|
+
"Search GIFs": "",
|
|
60
61
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "
|
|
62
|
-
"Send a message": "
|
|
62
|
+
"Send Anyway": "",
|
|
63
|
+
"Send a message": "",
|
|
63
64
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "
|
|
65
|
+
"Slow mode ON": "",
|
|
65
66
|
"The message has been reported to a moderator.": "",
|
|
66
67
|
"Thread Reply": "",
|
|
67
68
|
"Unblock User": "",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"Unpin from Conversation": "",
|
|
71
72
|
"Unread Messages": "Непрочитанные Сообщения",
|
|
72
73
|
"Video": "",
|
|
73
|
-
"You": "
|
|
74
|
+
"You": "",
|
|
74
75
|
"You can't send messages in this channel": "",
|
|
75
76
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
76
77
|
"{{ index }} of {{ photoLength }}": "",
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "
|
|
8
|
+
"Are you sure?": "",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -19,31 +19,32 @@
|
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
22
|
+
"Error loading": "",
|
|
23
23
|
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Dosya türü desteklenmiyor",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "
|
|
31
|
+
"How about sending your first message to a friend?": "",
|
|
32
32
|
"Instant Commands": "",
|
|
33
|
-
"Let's start chatting!": "
|
|
33
|
+
"Let's start chatting!": "",
|
|
34
34
|
"Links are disabled": "",
|
|
35
|
-
"Loading channels...": "
|
|
36
|
-
"Loading messages...": "
|
|
37
|
-
"Loading...": "
|
|
35
|
+
"Loading channels...": "",
|
|
36
|
+
"Loading messages...": "",
|
|
37
|
+
"Loading...": "",
|
|
38
38
|
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
39
|
-
"Message Reactions": "
|
|
39
|
+
"Message Reactions": "",
|
|
40
40
|
"Message deleted": "Mesaj silindi",
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
|
+
"No chats here yet…": "",
|
|
43
44
|
"Not supported": "",
|
|
44
45
|
"Nothing yet...": "",
|
|
45
46
|
"Ok": "",
|
|
46
|
-
"Only visible to you": "",
|
|
47
|
+
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
47
48
|
"Open Settings": "",
|
|
48
49
|
"Photo": "",
|
|
49
50
|
"Photos and Videos": "",
|
|
@@ -52,16 +53,16 @@
|
|
|
52
53
|
"Please allow Audio permissions in settings.": "",
|
|
53
54
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
55
|
"Please select a channel first": "",
|
|
55
|
-
"Reconnecting...": "
|
|
56
|
+
"Reconnecting...": "",
|
|
56
57
|
"Reply": "",
|
|
57
|
-
"Reply to Message": "
|
|
58
|
+
"Reply to Message": "",
|
|
58
59
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "
|
|
60
|
+
"Search GIFs": "",
|
|
60
61
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "
|
|
62
|
-
"Send a message": "
|
|
62
|
+
"Send Anyway": "",
|
|
63
|
+
"Send a message": "",
|
|
63
64
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "
|
|
65
|
+
"Slow mode ON": "",
|
|
65
66
|
"The message has been reported to a moderator.": "",
|
|
66
67
|
"Thread Reply": "",
|
|
67
68
|
"Unblock User": "",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"Unpin from Conversation": "",
|
|
71
72
|
"Unread Messages": "Okunmamış Mesajlar",
|
|
72
73
|
"Video": "",
|
|
73
|
-
"You": "
|
|
74
|
+
"You": "",
|
|
74
75
|
"You can't send messages in this channel": "",
|
|
75
76
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
76
77
|
"{{ index }} of {{ photoLength }}": "",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/ChatIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAqB,MAAM,cAAc,CAAC;AAE5D,eAAO,MAAM,QAAQ,UAAW,SAAS,sBAOxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAA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IACG,WAAW,CAAC,QAAQ,EAAE,MAAM;IAoBlC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW5D,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.29.1-beta.
|
|
4
|
+
"version": "5.29.1-beta.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -598,7 +598,7 @@ const ChannelWithContext = <
|
|
|
598
598
|
const [error, setError] = useState<Error | boolean>(false);
|
|
599
599
|
const [hasMore, setHasMore] = useState(true);
|
|
600
600
|
const [lastRead, setLastRead] = useState<ChannelContextValue<StreamChatGenerics>['lastRead']>();
|
|
601
|
-
const [loading, setLoading] = useState(
|
|
601
|
+
const [loading, setLoading] = useState(false);
|
|
602
602
|
const [loadingMore, setLoadingMore] = useState(false);
|
|
603
603
|
|
|
604
604
|
const [loadingMoreRecent, setLoadingMoreRecent] = useState(false);
|
|
@@ -645,10 +645,8 @@ const ChannelWithContext = <
|
|
|
645
645
|
* Also there is no use case from UX perspective, why one would need loading uninitialized channel at particular message.
|
|
646
646
|
* If the channel is not initiated, then we need to do channel.watch, which is more expensive for backend than channel.query.
|
|
647
647
|
*/
|
|
648
|
-
let channelLoaded = false;
|
|
649
648
|
if (!channel.initialized) {
|
|
650
649
|
await loadChannel();
|
|
651
|
-
channelLoaded = true;
|
|
652
650
|
}
|
|
653
651
|
|
|
654
652
|
if (messageId) {
|
|
@@ -658,8 +656,6 @@ const ChannelWithContext = <
|
|
|
658
656
|
channel.countUnread() > scrollToFirstUnreadThreshold
|
|
659
657
|
) {
|
|
660
658
|
loadChannelAtFirstUnreadMessage();
|
|
661
|
-
} else if (!channelLoaded) {
|
|
662
|
-
loadChannel();
|
|
663
659
|
}
|
|
664
660
|
};
|
|
665
661
|
|
|
@@ -1167,15 +1163,19 @@ const ChannelWithContext = <
|
|
|
1167
1163
|
});
|
|
1168
1164
|
|
|
1169
1165
|
const loadChannel = () =>
|
|
1170
|
-
channelQueryCallRef.current(
|
|
1171
|
-
|
|
1172
|
-
|
|
1166
|
+
channelQueryCallRef.current(
|
|
1167
|
+
async () => {
|
|
1168
|
+
if (!channel?.initialized || !channel.state.isUpToDate) {
|
|
1169
|
+
await channel?.watch();
|
|
1170
|
+
} else {
|
|
1171
|
+
await channel.state.loadMessageIntoState('latest');
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
() => {
|
|
1173
1175
|
channel?.state.setIsUpToDate(true);
|
|
1174
1176
|
setHasNoMoreRecentMessagesToLoad(true);
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
}
|
|
1178
|
-
});
|
|
1177
|
+
},
|
|
1178
|
+
);
|
|
1179
1179
|
|
|
1180
1180
|
const reloadThread = async () => {
|
|
1181
1181
|
if (!channel || !thread?.id) return;
|
|
@@ -34,27 +34,22 @@ export const useNewMessage = <
|
|
|
34
34
|
} else {
|
|
35
35
|
setChannels((channels) => {
|
|
36
36
|
if (!channels) return channels;
|
|
37
|
+
const channelInList = channels.filter((channel) => channel.cid === event.cid).length > 0;
|
|
37
38
|
|
|
38
|
-
if (!
|
|
39
|
-
const targetChannelIndex = channels.findIndex((c) => c.cid === event.cid);
|
|
40
|
-
|
|
41
|
-
if (targetChannelIndex >= 0) {
|
|
42
|
-
return moveChannelUp<StreamChatGenerics>({
|
|
43
|
-
channels,
|
|
44
|
-
cid: event.cid,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
39
|
+
if (!channelInList && event.channel_type && event.channel_id) {
|
|
48
40
|
// If channel doesn't exist in existing list, check in activeChannels as well.
|
|
49
41
|
// It may happen that channel was hidden using channel.hide(). In that case
|
|
50
42
|
// We remove it from `channels` state, but its still being watched and exists in client.activeChannels.
|
|
51
43
|
const channel = client.channel(event.channel_type, event.channel_id);
|
|
52
|
-
|
|
53
|
-
if (channel.initialized) {
|
|
54
|
-
return [channel, ...channels];
|
|
55
|
-
}
|
|
44
|
+
return [channel, ...channels];
|
|
56
45
|
}
|
|
57
46
|
|
|
47
|
+
if (!lockChannelOrder && event.cid)
|
|
48
|
+
return moveChannelUp<StreamChatGenerics>({
|
|
49
|
+
channels,
|
|
50
|
+
cid: event.cid,
|
|
51
|
+
});
|
|
52
|
+
|
|
58
53
|
return [...channels];
|
|
59
54
|
});
|
|
60
55
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import uniqBy from 'lodash/uniqBy';
|
|
1
2
|
import type { Channel, StreamChat } from 'stream-chat';
|
|
2
3
|
|
|
3
4
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
@@ -24,7 +25,7 @@ export const moveChannelUp = <
|
|
|
24
25
|
channels.splice(index, 1);
|
|
25
26
|
channels.unshift(channel);
|
|
26
27
|
|
|
27
|
-
return [...channels];
|
|
28
|
+
return uniqBy([channel, ...channels], 'cid');
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
type GetParameters<
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
} from '../../contexts/channelsContext/ChannelsContext';
|
|
11
11
|
import { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';
|
|
12
12
|
|
|
13
|
-
import { useTranslatedMessage } from '../../hooks/useTranslatedMessage';
|
|
14
13
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
15
14
|
|
|
16
15
|
export type ChannelPreviewPropsWithContext<
|
|
@@ -40,14 +39,10 @@ const ChannelPreviewWithContext = <
|
|
|
40
39
|
| undefined
|
|
41
40
|
>(channel.state.messages[channel.state.messages.length - 1]);
|
|
42
41
|
|
|
43
|
-
const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(
|
|
44
|
-
lastMessage || ({} as MessageResponse<StreamChatGenerics>),
|
|
45
|
-
);
|
|
46
|
-
|
|
47
42
|
const [forceUpdate, setForceUpdate] = useState(0);
|
|
48
43
|
const [unread, setUnread] = useState(channel.countUnread());
|
|
49
44
|
|
|
50
|
-
const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate
|
|
45
|
+
const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate);
|
|
51
46
|
|
|
52
47
|
const channelLastMessage = channel.lastMessage();
|
|
53
48
|
const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;
|
|
@@ -45,7 +45,7 @@ describe('useLatestMessagePreview', () => {
|
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
it('should return a deleted message preview if the latest message is deleted', async () => {
|
|
48
|
-
const latestMessage = { type: 'deleted' } as unknown as MessageResponse;
|
|
48
|
+
const latestMessage = { cid: 'test', type: 'deleted' } as unknown as MessageResponse;
|
|
49
49
|
|
|
50
50
|
const { result } = renderHook(
|
|
51
51
|
() => useLatestMessagePreview(CHANNEL_WITH_DELETED_MESSAGES, FORCE_UPDATE, latestMessage),
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useTranslationContext,
|
|
10
10
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
11
11
|
|
|
12
|
+
import { useTranslatedMessage } from '../../../hooks/useTranslatedMessage';
|
|
12
13
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
13
14
|
|
|
14
15
|
type LatestMessage<
|
|
@@ -237,9 +238,6 @@ export const useLatestMessagePreview = <
|
|
|
237
238
|
>(
|
|
238
239
|
channel: Channel<StreamChatGenerics>,
|
|
239
240
|
forceUpdate: number,
|
|
240
|
-
lastMessage?:
|
|
241
|
-
| ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>
|
|
242
|
-
| MessageResponse<StreamChatGenerics>,
|
|
243
241
|
) => {
|
|
244
242
|
const { client } = useChatContext<StreamChatGenerics>();
|
|
245
243
|
const { t, tDateTimeParser } = useTranslationContext();
|
|
@@ -249,9 +247,9 @@ export const useLatestMessagePreview = <
|
|
|
249
247
|
const messages = channel.state.messages;
|
|
250
248
|
const message = messages.length ? messages[messages.length - 1] : undefined;
|
|
251
249
|
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
}`;
|
|
250
|
+
const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(message);
|
|
251
|
+
|
|
252
|
+
const channelLastMessageString = `${message?.id}${message?.updated_at}`;
|
|
255
253
|
|
|
256
254
|
const [readEvents, setReadEvents] = useState(true);
|
|
257
255
|
const [latestMessagePreview, setLatestMessagePreview] = useState<
|
|
@@ -268,12 +266,7 @@ export const useLatestMessagePreview = <
|
|
|
268
266
|
status: MessageReadStatus.NOT_SENT_BY_CURRENT_USER,
|
|
269
267
|
});
|
|
270
268
|
|
|
271
|
-
const readStatus = getLatestMessageReadStatus(
|
|
272
|
-
channel,
|
|
273
|
-
client,
|
|
274
|
-
lastMessage || message,
|
|
275
|
-
readEvents,
|
|
276
|
-
);
|
|
269
|
+
const readStatus = getLatestMessageReadStatus(channel, client, translatedLastMessage, readEvents);
|
|
277
270
|
|
|
278
271
|
useEffect(() => {
|
|
279
272
|
if (channelConfigExists) {
|
|
@@ -290,7 +283,7 @@ export const useLatestMessagePreview = <
|
|
|
290
283
|
getLatestMessagePreview({
|
|
291
284
|
channel,
|
|
292
285
|
client,
|
|
293
|
-
lastMessage,
|
|
286
|
+
lastMessage: translatedLastMessage,
|
|
294
287
|
readEvents,
|
|
295
288
|
t,
|
|
296
289
|
tDateTimeParser,
|
|
@@ -4,7 +4,7 @@ import { StyleSheet, Text, View } from 'react-native';
|
|
|
4
4
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
5
5
|
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
6
6
|
import { useViewport } from '../../hooks/useViewport';
|
|
7
|
-
import { MessageIcon } from '../../icons
|
|
7
|
+
import { ChatIcon, MessageIcon } from '../../icons';
|
|
8
8
|
|
|
9
9
|
const styles = StyleSheet.create({
|
|
10
10
|
channelContainer: {
|
|
@@ -21,6 +21,16 @@ const styles = StyleSheet.create({
|
|
|
21
21
|
paddingBottom: 8,
|
|
22
22
|
paddingTop: 16,
|
|
23
23
|
},
|
|
24
|
+
messageContainer: {
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
flex: 1,
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
},
|
|
29
|
+
messageTitle: {
|
|
30
|
+
fontSize: 20,
|
|
31
|
+
fontWeight: 'bold',
|
|
32
|
+
paddingBottom: 8,
|
|
33
|
+
},
|
|
24
34
|
});
|
|
25
35
|
|
|
26
36
|
export type EmptyStateProps = {
|
|
@@ -58,7 +68,14 @@ export const EmptyStateIndicator = ({ listType }: EmptyStateProps) => {
|
|
|
58
68
|
</View>
|
|
59
69
|
);
|
|
60
70
|
case 'message':
|
|
61
|
-
return
|
|
71
|
+
return (
|
|
72
|
+
<View style={[styles.messageContainer]}>
|
|
73
|
+
<ChatIcon height={width} pathFill={grey_gainsboro} width={width} />
|
|
74
|
+
<Text style={[styles.messageTitle, { color: grey_gainsboro }]}>
|
|
75
|
+
{t<string>('No chats here yet…')}
|
|
76
|
+
</Text>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
62
79
|
default:
|
|
63
80
|
return <Text style={{ color: black }}>No items exist</Text>;
|
|
64
81
|
}
|
|
@@ -250,10 +250,13 @@ export const useAudioController = () => {
|
|
|
250
250
|
|
|
251
251
|
const resampledWaveformData = resampleWaveformData(waveformData, 100);
|
|
252
252
|
|
|
253
|
+
const clearFilter = new RegExp('[.:]', 'g');
|
|
254
|
+
const date = new Date().toISOString().replace(clearFilter, '_');
|
|
255
|
+
|
|
253
256
|
const file: File = {
|
|
254
257
|
duration: durationInSeconds,
|
|
255
258
|
mimeType: 'audio/aac',
|
|
256
|
-
name: `audio_recording_${
|
|
259
|
+
name: `audio_recording_${date}.aac`,
|
|
257
260
|
type: 'voiceRecording',
|
|
258
261
|
uri: typeof recording !== 'string' ? (recording?.getURI() as string) : (recording as string),
|
|
259
262
|
waveform_data: resampledWaveformData,
|
|
@@ -9,7 +9,7 @@ type TranslationKey = `${TranslationLanguages}_text`;
|
|
|
9
9
|
export const useTranslatedMessage = <
|
|
10
10
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
11
11
|
>(
|
|
12
|
-
message
|
|
12
|
+
message?: MessageResponse<StreamChatGenerics> | FormatMessageResponse<StreamChatGenerics>,
|
|
13
13
|
) => {
|
|
14
14
|
const { userLanguage: translationContextUserLanguage } = useTranslationContext();
|
|
15
15
|
const messageOverlayContextValue = useMessageOverlayContext<StreamChatGenerics>();
|
|
@@ -19,6 +19,8 @@ export const useTranslatedMessage = <
|
|
|
19
19
|
|
|
20
20
|
const translationKey: TranslationKey = `${userLanguage}_text`;
|
|
21
21
|
|
|
22
|
+
if (!message) return undefined;
|
|
23
|
+
|
|
22
24
|
if (message.i18n && translationKey in message.i18n && message.type !== 'deleted') {
|
|
23
25
|
return {
|
|
24
26
|
...message,
|
package/src/i18n/en.json
CHANGED