stream-chat-react-native-core 5.25.0 → 5.26.0-beta.1
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 +420 -391
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -1
- package/lib/commonjs/i18n/es.json +74 -74
- package/lib/commonjs/i18n/fr.json +74 -74
- package/lib/commonjs/i18n/he.json +74 -74
- package/lib/commonjs/i18n/hi.json +74 -74
- package/lib/commonjs/i18n/it.json +74 -74
- package/lib/commonjs/i18n/ja.json +74 -74
- package/lib/commonjs/i18n/ko.json +74 -74
- package/lib/commonjs/i18n/nl.json +74 -74
- package/lib/commonjs/i18n/pt-BR.json +79 -0
- package/lib/commonjs/i18n/ru.json +74 -74
- package/lib/commonjs/i18n/tr.json +74 -74
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +420 -391
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/i18n/en.json +1 -1
- package/lib/module/i18n/es.json +74 -74
- package/lib/module/i18n/fr.json +74 -74
- package/lib/module/i18n/he.json +74 -74
- package/lib/module/i18n/hi.json +74 -74
- package/lib/module/i18n/it.json +74 -74
- package/lib/module/i18n/ja.json +74 -74
- package/lib/module/i18n/ko.json +74 -74
- package/lib/module/i18n/nl.json +74 -74
- package/lib/module/i18n/pt-BR.json +79 -0
- package/lib/module/i18n/ru.json +74 -74
- package/lib/module/i18n/tr.json +74 -74
- package/lib/module/version.json +1 -1
- package/lib/typescript/i18n/en.json +1 -1
- package/lib/typescript/i18n/es.json +74 -74
- package/lib/typescript/i18n/fr.json +74 -74
- package/lib/typescript/i18n/he.json +74 -74
- package/lib/typescript/i18n/hi.json +74 -74
- package/lib/typescript/i18n/it.json +74 -74
- package/lib/typescript/i18n/ja.json +74 -74
- package/lib/typescript/i18n/ko.json +74 -74
- package/lib/typescript/i18n/nl.json +74 -74
- package/lib/typescript/i18n/pt-BR.json +79 -0
- package/lib/typescript/i18n/ru.json +74 -74
- package/lib/typescript/i18n/tr.json +74 -74
- package/package.json +1 -1
- package/src/components/Channel/Channel.tsx +26 -19
- package/src/i18n/en.json +1 -1
- package/src/i18n/es.json +74 -74
- package/src/i18n/fr.json +74 -74
- package/src/i18n/he.json +74 -74
- package/src/i18n/hi.json +74 -74
- package/src/i18n/it.json +74 -74
- package/src/i18n/ja.json +74 -74
- package/src/i18n/ko.json +74 -74
- package/src/i18n/nl.json +74 -74
- package/src/i18n/pt-BR.json +79 -0
- package/src/i18n/ru.json +74 -74
- package/src/i18n/tr.json +74 -74
- package/src/version.json +1 -1
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
3
|
"1 Thread Reply": "1 тема Ответить",
|
|
4
|
-
"Allow access to your Gallery": "
|
|
5
|
-
"Allow camera access in device settings": "
|
|
6
|
-
"Also send to channel": "
|
|
7
|
-
"Are you sure you want to permanently delete this message?": "
|
|
8
|
-
"Are you sure?": "
|
|
9
|
-
"Block User": "
|
|
10
|
-
"Cancel": "
|
|
11
|
-
"Cannot Flag Message": "
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
13
|
-
"Copy Message": "
|
|
14
|
-
"Delete": "
|
|
15
|
-
"Delete Message": "
|
|
16
|
-
"Device camera is used to take photos or videos.": "
|
|
17
|
-
"Do you want to send a copy of this message to a moderator for further investigation?": "
|
|
18
|
-
"Edit Message": "
|
|
19
|
-
"Editing Message": "
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
25
|
-
"Error while loading, please reload/refresh": "
|
|
26
|
-
"File type not supported": "
|
|
27
|
-
"Flag": "
|
|
28
|
-
"Flag Message": "
|
|
29
|
-
"Flag action failed either due to a network issue or the message is already flagged": "
|
|
30
|
-
"How about sending your first message to a friend?": "
|
|
31
|
-
"Instant Commands": "
|
|
32
|
-
"Let's start chatting!": "
|
|
33
|
-
"Links are disabled": "
|
|
34
|
-
"Loading channels...": "
|
|
35
|
-
"Loading messages...": "
|
|
36
|
-
"Loading...": "
|
|
37
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
38
|
-
"Message Reactions": "
|
|
39
|
-
"Message deleted": "
|
|
40
|
-
"Message flagged": "
|
|
41
|
-
"Mute User": "
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "
|
|
44
|
-
"Ok": "
|
|
4
|
+
"Allow access to your Gallery": "",
|
|
5
|
+
"Allow camera access in device settings": "",
|
|
6
|
+
"Also send to channel": "",
|
|
7
|
+
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
+
"Are you sure?": "",
|
|
9
|
+
"Block User": "",
|
|
10
|
+
"Cancel": "",
|
|
11
|
+
"Cannot Flag Message": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
|
+
"Copy Message": "",
|
|
14
|
+
"Delete": "",
|
|
15
|
+
"Delete Message": "",
|
|
16
|
+
"Device camera is used to take photos or videos.": "",
|
|
17
|
+
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
|
+
"Edit Message": "",
|
|
19
|
+
"Editing Message": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "",
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "",
|
|
26
|
+
"File type not supported": "",
|
|
27
|
+
"Flag": "",
|
|
28
|
+
"Flag Message": "",
|
|
29
|
+
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
|
+
"How about sending your first message to a friend?": "",
|
|
31
|
+
"Instant Commands": "",
|
|
32
|
+
"Let's start chatting!": "",
|
|
33
|
+
"Links are disabled": "",
|
|
34
|
+
"Loading channels...": "",
|
|
35
|
+
"Loading messages...": "",
|
|
36
|
+
"Loading...": "",
|
|
37
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
38
|
+
"Message Reactions": "",
|
|
39
|
+
"Message deleted": "",
|
|
40
|
+
"Message flagged": "",
|
|
41
|
+
"Mute User": "",
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "",
|
|
44
|
+
"Ok": "",
|
|
45
45
|
"Only visible to you": "Видно только вам",
|
|
46
|
-
"Open Settings": "
|
|
47
|
-
"Photo": "
|
|
48
|
-
"Photos and Videos": "
|
|
49
|
-
"Pin to Conversation": "
|
|
50
|
-
"Pinned by": "
|
|
51
|
-
"Please enable access to your photos and videos so you can share them.": "
|
|
52
|
-
"Please select a channel first": "
|
|
53
|
-
"Reconnecting...": "
|
|
54
|
-
"Reply": "
|
|
55
|
-
"Reply to Message": "
|
|
56
|
-
"Resend": "
|
|
57
|
-
"Search GIFs": "
|
|
58
|
-
"Select More Photos": "
|
|
59
|
-
"Send Anyway": "
|
|
60
|
-
"Send a message": "
|
|
61
|
-
"Sending links is not allowed in this conversation": "
|
|
62
|
-
"Slow mode ON": "
|
|
63
|
-
"The message has been reported to a moderator.": "
|
|
64
|
-
"Thread Reply": "
|
|
65
|
-
"Unblock User": "
|
|
66
|
-
"Unknown User": "
|
|
67
|
-
"Unmute User": "
|
|
68
|
-
"Unpin from Conversation": "
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "
|
|
72
|
-
"You can't send messages in this channel": "
|
|
73
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
75
|
-
"{{ replyCount }} Replies": "
|
|
46
|
+
"Open Settings": "",
|
|
47
|
+
"Photo": "",
|
|
48
|
+
"Photos and Videos": "",
|
|
49
|
+
"Pin to Conversation": "",
|
|
50
|
+
"Pinned by": "",
|
|
51
|
+
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
|
+
"Please select a channel first": "",
|
|
53
|
+
"Reconnecting...": "",
|
|
54
|
+
"Reply": "",
|
|
55
|
+
"Reply to Message": "",
|
|
56
|
+
"Resend": "",
|
|
57
|
+
"Search GIFs": "",
|
|
58
|
+
"Select More Photos": "",
|
|
59
|
+
"Send Anyway": "",
|
|
60
|
+
"Send a message": "",
|
|
61
|
+
"Sending links is not allowed in this conversation": "",
|
|
62
|
+
"Slow mode ON": "",
|
|
63
|
+
"The message has been reported to a moderator.": "",
|
|
64
|
+
"Thread Reply": "",
|
|
65
|
+
"Unblock User": "",
|
|
66
|
+
"Unknown User": "",
|
|
67
|
+
"Unmute User": "",
|
|
68
|
+
"Unpin from Conversation": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "",
|
|
72
|
+
"You can't send messages in this channel": "",
|
|
73
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
+
"{{ replyCount }} Replies": "",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
|
|
77
|
-
"{{ user }} is typing": "
|
|
78
|
-
"🏙 Attachment...": "
|
|
77
|
+
"{{ user }} is typing": "",
|
|
78
|
+
"🏙 Attachment...": ""
|
|
79
79
|
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
3
|
"1 Thread Reply": "1 Konu Yanıtı",
|
|
4
|
-
"Allow access to your Gallery": "
|
|
5
|
-
"Allow camera access in device settings": "
|
|
6
|
-
"Also send to channel": "
|
|
7
|
-
"Are you sure you want to permanently delete this message?": "
|
|
8
|
-
"Are you sure?": "
|
|
9
|
-
"Block User": "
|
|
10
|
-
"Cancel": "
|
|
11
|
-
"Cannot Flag Message": "
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
13
|
-
"Copy Message": "
|
|
14
|
-
"Delete": "
|
|
15
|
-
"Delete Message": "
|
|
16
|
-
"Device camera is used to take photos or videos.": "
|
|
17
|
-
"Do you want to send a copy of this message to a moderator for further investigation?": "
|
|
18
|
-
"Edit Message": "
|
|
19
|
-
"Editing Message": "
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
25
|
-
"Error while loading, please reload/refresh": "
|
|
26
|
-
"File type not supported": "
|
|
27
|
-
"Flag": "
|
|
28
|
-
"Flag Message": "
|
|
29
|
-
"Flag action failed either due to a network issue or the message is already flagged": "
|
|
30
|
-
"How about sending your first message to a friend?": "
|
|
31
|
-
"Instant Commands": "
|
|
32
|
-
"Let's start chatting!": "
|
|
33
|
-
"Links are disabled": "
|
|
34
|
-
"Loading channels...": "
|
|
35
|
-
"Loading messages...": "
|
|
36
|
-
"Loading...": "
|
|
37
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
38
|
-
"Message Reactions": "
|
|
39
|
-
"Message deleted": "
|
|
40
|
-
"Message flagged": "
|
|
41
|
-
"Mute User": "
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "
|
|
44
|
-
"Ok": "
|
|
4
|
+
"Allow access to your Gallery": "",
|
|
5
|
+
"Allow camera access in device settings": "",
|
|
6
|
+
"Also send to channel": "",
|
|
7
|
+
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
+
"Are you sure?": "",
|
|
9
|
+
"Block User": "",
|
|
10
|
+
"Cancel": "",
|
|
11
|
+
"Cannot Flag Message": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
|
+
"Copy Message": "",
|
|
14
|
+
"Delete": "",
|
|
15
|
+
"Delete Message": "",
|
|
16
|
+
"Device camera is used to take photos or videos.": "",
|
|
17
|
+
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
|
+
"Edit Message": "",
|
|
19
|
+
"Editing Message": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "",
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "",
|
|
26
|
+
"File type not supported": "",
|
|
27
|
+
"Flag": "",
|
|
28
|
+
"Flag Message": "",
|
|
29
|
+
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
|
+
"How about sending your first message to a friend?": "",
|
|
31
|
+
"Instant Commands": "",
|
|
32
|
+
"Let's start chatting!": "",
|
|
33
|
+
"Links are disabled": "",
|
|
34
|
+
"Loading channels...": "",
|
|
35
|
+
"Loading messages...": "",
|
|
36
|
+
"Loading...": "",
|
|
37
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
38
|
+
"Message Reactions": "",
|
|
39
|
+
"Message deleted": "",
|
|
40
|
+
"Message flagged": "",
|
|
41
|
+
"Mute User": "",
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "",
|
|
44
|
+
"Ok": "",
|
|
45
45
|
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
46
|
-
"Open Settings": "
|
|
47
|
-
"Photo": "
|
|
48
|
-
"Photos and Videos": "
|
|
49
|
-
"Pin to Conversation": "
|
|
50
|
-
"Pinned by": "
|
|
51
|
-
"Please enable access to your photos and videos so you can share them.": "
|
|
52
|
-
"Please select a channel first": "
|
|
53
|
-
"Reconnecting...": "
|
|
54
|
-
"Reply": "
|
|
55
|
-
"Reply to Message": "
|
|
56
|
-
"Resend": "
|
|
57
|
-
"Search GIFs": "
|
|
58
|
-
"Select More Photos": "
|
|
59
|
-
"Send Anyway": "
|
|
60
|
-
"Send a message": "
|
|
61
|
-
"Sending links is not allowed in this conversation": "
|
|
62
|
-
"Slow mode ON": "
|
|
63
|
-
"The message has been reported to a moderator.": "
|
|
64
|
-
"Thread Reply": "
|
|
65
|
-
"Unblock User": "
|
|
66
|
-
"Unknown User": "
|
|
67
|
-
"Unmute User": "
|
|
68
|
-
"Unpin from Conversation": "
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "
|
|
72
|
-
"You can't send messages in this channel": "
|
|
73
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
75
|
-
"{{ replyCount }} Replies": "
|
|
46
|
+
"Open Settings": "",
|
|
47
|
+
"Photo": "",
|
|
48
|
+
"Photos and Videos": "",
|
|
49
|
+
"Pin to Conversation": "",
|
|
50
|
+
"Pinned by": "",
|
|
51
|
+
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
|
+
"Please select a channel first": "",
|
|
53
|
+
"Reconnecting...": "",
|
|
54
|
+
"Reply": "",
|
|
55
|
+
"Reply to Message": "",
|
|
56
|
+
"Resend": "",
|
|
57
|
+
"Search GIFs": "",
|
|
58
|
+
"Select More Photos": "",
|
|
59
|
+
"Send Anyway": "",
|
|
60
|
+
"Send a message": "",
|
|
61
|
+
"Sending links is not allowed in this conversation": "",
|
|
62
|
+
"Slow mode ON": "",
|
|
63
|
+
"The message has been reported to a moderator.": "",
|
|
64
|
+
"Thread Reply": "",
|
|
65
|
+
"Unblock User": "",
|
|
66
|
+
"Unknown User": "",
|
|
67
|
+
"Unmute User": "",
|
|
68
|
+
"Unpin from Conversation": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "",
|
|
72
|
+
"You can't send messages in this channel": "",
|
|
73
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
+
"{{ replyCount }} Replies": "",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
|
|
77
|
-
"{{ user }} is typing": "
|
|
78
|
-
"🏙 Attachment...": "
|
|
77
|
+
"{{ user }} is typing": "",
|
|
78
|
+
"🏙 Attachment...": ""
|
|
79
79
|
}
|
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.
|
|
4
|
+
"version": "5.26.0-beta.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -592,7 +592,7 @@ const ChannelWithContext = <
|
|
|
592
592
|
const [threadHasMore, setThreadHasMore] = useState(true);
|
|
593
593
|
const [threadLoadingMore, setThreadLoadingMore] = useState(false);
|
|
594
594
|
|
|
595
|
-
const
|
|
595
|
+
const syncingChannelRef = useRef(false);
|
|
596
596
|
|
|
597
597
|
/**
|
|
598
598
|
* Flag to track if we know for sure that there are no more recent messages to load.
|
|
@@ -618,7 +618,7 @@ const ChannelWithContext = <
|
|
|
618
618
|
const channelId = channel?.id || '';
|
|
619
619
|
|
|
620
620
|
useEffect(() => {
|
|
621
|
-
const initChannel = () => {
|
|
621
|
+
const initChannel = async () => {
|
|
622
622
|
if (!channel || !shouldSyncChannel || channel.offlineMode) return;
|
|
623
623
|
/**
|
|
624
624
|
* Loading channel at first unread message requires channel to be initialized in the first place,
|
|
@@ -626,22 +626,20 @@ const ChannelWithContext = <
|
|
|
626
626
|
* Also there is no use case from UX perspective, why one would need loading uninitialized channel at particular message.
|
|
627
627
|
* If the channel is not initiated, then we need to do channel.watch, which is more expensive for backend than channel.query.
|
|
628
628
|
*/
|
|
629
|
+
let channelLoaded = false;
|
|
629
630
|
if (!channel.initialized) {
|
|
630
|
-
loadChannel();
|
|
631
|
-
|
|
631
|
+
await loadChannel();
|
|
632
|
+
channelLoaded = true;
|
|
632
633
|
}
|
|
633
634
|
|
|
634
635
|
if (messageId) {
|
|
635
636
|
loadChannelAroundMessage({ messageId });
|
|
636
|
-
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
if (
|
|
637
|
+
} else if (
|
|
640
638
|
initialScrollToFirstUnreadMessage &&
|
|
641
639
|
channel.countUnread() > scrollToFirstUnreadThreshold
|
|
642
640
|
) {
|
|
643
641
|
loadChannelAtFirstUnreadMessage();
|
|
644
|
-
} else {
|
|
642
|
+
} else if (!channelLoaded) {
|
|
645
643
|
loadChannel();
|
|
646
644
|
}
|
|
647
645
|
};
|
|
@@ -858,9 +856,11 @@ const ChannelWithContext = <
|
|
|
858
856
|
if (typeof scrollToMessageId === 'function') {
|
|
859
857
|
scrollToMessageId = scrollToMessageId();
|
|
860
858
|
}
|
|
859
|
+
|
|
861
860
|
const scrollToMessageIndex = scrollToMessageId
|
|
862
861
|
? currentMessages.findIndex(({ id }) => id === scrollToMessageId)
|
|
863
862
|
: -1;
|
|
863
|
+
|
|
864
864
|
if (channel && scrollToMessageIndex !== -1) {
|
|
865
865
|
// We assume that on average user sees 5 messages on screen
|
|
866
866
|
// We dont want new renders to happen while scrolling to the targeted message
|
|
@@ -977,13 +977,15 @@ const ChannelWithContext = <
|
|
|
977
977
|
// in order to attempt to not throw away, will attempt to merge it by loading 25 more messages
|
|
978
978
|
const recentCurrentSetMsgId =
|
|
979
979
|
currentMessageSet.messages[currentMessageSet.messages.length - 1].id;
|
|
980
|
-
await channel.query(
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
980
|
+
await channel.query(
|
|
981
|
+
{
|
|
982
|
+
messages: {
|
|
983
|
+
id_gte: recentCurrentSetMsgId,
|
|
984
|
+
limit: 25,
|
|
985
|
+
},
|
|
984
986
|
},
|
|
985
|
-
|
|
986
|
-
|
|
987
|
+
'current',
|
|
988
|
+
);
|
|
987
989
|
// if the gap is more than 25, we will unfortunately have to throw away the latest messages
|
|
988
990
|
}
|
|
989
991
|
} else {
|
|
@@ -1153,10 +1155,11 @@ const ChannelWithContext = <
|
|
|
1153
1155
|
};
|
|
1154
1156
|
|
|
1155
1157
|
const resyncChannel = async () => {
|
|
1156
|
-
if (!channel ||
|
|
1158
|
+
if (!channel || syncingChannelRef.current) return;
|
|
1159
|
+
if (!channel.initialized) return;
|
|
1157
1160
|
hasOverlappingRecentMessagesRef.current = false;
|
|
1158
1161
|
clearInterval(mergeSetsIntervalRef.current);
|
|
1159
|
-
|
|
1162
|
+
syncingChannelRef.current = true;
|
|
1160
1163
|
|
|
1161
1164
|
setError(false);
|
|
1162
1165
|
try {
|
|
@@ -1263,7 +1266,7 @@ const ChannelWithContext = <
|
|
|
1263
1266
|
setLoading(false);
|
|
1264
1267
|
}
|
|
1265
1268
|
|
|
1266
|
-
|
|
1269
|
+
syncingChannelRef.current = false;
|
|
1267
1270
|
};
|
|
1268
1271
|
|
|
1269
1272
|
// resync channel is added to ref so that it can be used in useEffect without adding it as a dependency
|
|
@@ -1279,7 +1282,11 @@ const ChannelWithContext = <
|
|
|
1279
1282
|
let connectionChangedSubscription: ReturnType<ChannelType['on']>;
|
|
1280
1283
|
|
|
1281
1284
|
if (enableOfflineSupport) {
|
|
1282
|
-
connectionChangedSubscription = DBSyncManager.onSyncStatusChange(
|
|
1285
|
+
connectionChangedSubscription = DBSyncManager.onSyncStatusChange((statusChanged) => {
|
|
1286
|
+
if (statusChanged) {
|
|
1287
|
+
connectionChangedHandler();
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1283
1290
|
} else {
|
|
1284
1291
|
connectionChangedSubscription = client.on('connection.changed', (event) => {
|
|
1285
1292
|
if (event.online) {
|
package/src/i18n/en.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"File type not supported": "File type not supported",
|
|
27
27
|
"Flag": "Flag",
|
|
28
28
|
"Flag Message": "Flag Message",
|
|
29
|
-
"Flag action failed either due to a network issue or the message is already flagged": "Flag action failed either due to a network issue or the message is already flagged
|
|
29
|
+
"Flag action failed either due to a network issue or the message is already flagged": "Flag action failed either due to a network issue or the message is already flagged",
|
|
30
30
|
"How about sending your first message to a friend?": "How about sending your first message to a friend?",
|
|
31
31
|
"Instant Commands": "Instant Commands",
|
|
32
32
|
"Let's start chatting!": "Let's start chatting!",
|
package/src/i18n/es.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
3
|
"1 Thread Reply": "1 respuesta de hilo",
|
|
4
|
-
"Allow access to your Gallery": "
|
|
5
|
-
"Allow camera access in device settings": "
|
|
6
|
-
"Also send to channel": "
|
|
7
|
-
"Are you sure you want to permanently delete this message?": "
|
|
8
|
-
"Are you sure?": "
|
|
9
|
-
"Block User": "
|
|
10
|
-
"Cancel": "
|
|
11
|
-
"Cannot Flag Message": "
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "
|
|
13
|
-
"Copy Message": "
|
|
14
|
-
"Delete": "
|
|
15
|
-
"Delete Message": "
|
|
16
|
-
"Device camera is used to take photos or videos.": "
|
|
17
|
-
"Do you want to send a copy of this message to a moderator for further investigation?": "
|
|
18
|
-
"Edit Message": "
|
|
19
|
-
"Editing Message": "
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "
|
|
24
|
-
"Error loading messages for this channel...": "
|
|
25
|
-
"Error while loading, please reload/refresh": "
|
|
26
|
-
"File type not supported": "
|
|
27
|
-
"Flag": "
|
|
28
|
-
"Flag Message": "
|
|
29
|
-
"Flag action failed either due to a network issue or the message is already flagged": "
|
|
30
|
-
"How about sending your first message to a friend?": "
|
|
31
|
-
"Instant Commands": "
|
|
32
|
-
"Let's start chatting!": "
|
|
33
|
-
"Links are disabled": "
|
|
34
|
-
"Loading channels...": "
|
|
35
|
-
"Loading messages...": "
|
|
36
|
-
"Loading...": "
|
|
37
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
38
|
-
"Message Reactions": "
|
|
39
|
-
"Message deleted": "
|
|
40
|
-
"Message flagged": "
|
|
41
|
-
"Mute User": "
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "
|
|
44
|
-
"Ok": "
|
|
4
|
+
"Allow access to your Gallery": "",
|
|
5
|
+
"Allow camera access in device settings": "",
|
|
6
|
+
"Also send to channel": "",
|
|
7
|
+
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
+
"Are you sure?": "",
|
|
9
|
+
"Block User": "",
|
|
10
|
+
"Cancel": "",
|
|
11
|
+
"Cannot Flag Message": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
13
|
+
"Copy Message": "",
|
|
14
|
+
"Delete": "",
|
|
15
|
+
"Delete Message": "",
|
|
16
|
+
"Device camera is used to take photos or videos.": "",
|
|
17
|
+
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
|
+
"Edit Message": "",
|
|
19
|
+
"Editing Message": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "",
|
|
24
|
+
"Error loading messages for this channel...": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "",
|
|
26
|
+
"File type not supported": "",
|
|
27
|
+
"Flag": "",
|
|
28
|
+
"Flag Message": "",
|
|
29
|
+
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
|
+
"How about sending your first message to a friend?": "",
|
|
31
|
+
"Instant Commands": "",
|
|
32
|
+
"Let's start chatting!": "",
|
|
33
|
+
"Links are disabled": "",
|
|
34
|
+
"Loading channels...": "",
|
|
35
|
+
"Loading messages...": "",
|
|
36
|
+
"Loading...": "",
|
|
37
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
38
|
+
"Message Reactions": "",
|
|
39
|
+
"Message deleted": "",
|
|
40
|
+
"Message flagged": "",
|
|
41
|
+
"Mute User": "",
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "",
|
|
44
|
+
"Ok": "",
|
|
45
45
|
"Only visible to you": "Solo visible para ti",
|
|
46
|
-
"Open Settings": "
|
|
47
|
-
"Photo": "
|
|
48
|
-
"Photos and Videos": "
|
|
49
|
-
"Pin to Conversation": "
|
|
50
|
-
"Pinned by": "
|
|
51
|
-
"Please enable access to your photos and videos so you can share them.": "
|
|
52
|
-
"Please select a channel first": "
|
|
53
|
-
"Reconnecting...": "
|
|
54
|
-
"Reply": "
|
|
55
|
-
"Reply to Message": "
|
|
56
|
-
"Resend": "
|
|
57
|
-
"Search GIFs": "
|
|
58
|
-
"Select More Photos": "
|
|
59
|
-
"Send Anyway": "
|
|
60
|
-
"Send a message": "
|
|
61
|
-
"Sending links is not allowed in this conversation": "
|
|
62
|
-
"Slow mode ON": "
|
|
63
|
-
"The message has been reported to a moderator.": "
|
|
64
|
-
"Thread Reply": "
|
|
65
|
-
"Unblock User": "
|
|
66
|
-
"Unknown User": "
|
|
67
|
-
"Unmute User": "
|
|
68
|
-
"Unpin from Conversation": "
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "
|
|
72
|
-
"You can't send messages in this channel": "
|
|
73
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
75
|
-
"{{ replyCount }} Replies": "
|
|
46
|
+
"Open Settings": "",
|
|
47
|
+
"Photo": "",
|
|
48
|
+
"Photos and Videos": "",
|
|
49
|
+
"Pin to Conversation": "",
|
|
50
|
+
"Pinned by": "",
|
|
51
|
+
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
|
+
"Please select a channel first": "",
|
|
53
|
+
"Reconnecting...": "",
|
|
54
|
+
"Reply": "",
|
|
55
|
+
"Reply to Message": "",
|
|
56
|
+
"Resend": "",
|
|
57
|
+
"Search GIFs": "",
|
|
58
|
+
"Select More Photos": "",
|
|
59
|
+
"Send Anyway": "",
|
|
60
|
+
"Send a message": "",
|
|
61
|
+
"Sending links is not allowed in this conversation": "",
|
|
62
|
+
"Slow mode ON": "",
|
|
63
|
+
"The message has been reported to a moderator.": "",
|
|
64
|
+
"Thread Reply": "",
|
|
65
|
+
"Unblock User": "",
|
|
66
|
+
"Unknown User": "",
|
|
67
|
+
"Unmute User": "",
|
|
68
|
+
"Unpin from Conversation": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "",
|
|
72
|
+
"You can't send messages in this channel": "",
|
|
73
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
+
"{{ replyCount }} Replies": "",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "{{ replyCount }} respuestas de hilo",
|
|
77
|
-
"{{ user }} is typing": "
|
|
78
|
-
"🏙 Attachment...": "
|
|
77
|
+
"{{ user }} is typing": "",
|
|
78
|
+
"🏙 Attachment...": ""
|
|
79
79
|
}
|