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.
Files changed (57) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +420 -391
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/i18n/en.json +1 -1
  4. package/lib/commonjs/i18n/es.json +74 -74
  5. package/lib/commonjs/i18n/fr.json +74 -74
  6. package/lib/commonjs/i18n/he.json +74 -74
  7. package/lib/commonjs/i18n/hi.json +74 -74
  8. package/lib/commonjs/i18n/it.json +74 -74
  9. package/lib/commonjs/i18n/ja.json +74 -74
  10. package/lib/commonjs/i18n/ko.json +74 -74
  11. package/lib/commonjs/i18n/nl.json +74 -74
  12. package/lib/commonjs/i18n/pt-BR.json +79 -0
  13. package/lib/commonjs/i18n/ru.json +74 -74
  14. package/lib/commonjs/i18n/tr.json +74 -74
  15. package/lib/commonjs/version.json +1 -1
  16. package/lib/module/components/Channel/Channel.js +420 -391
  17. package/lib/module/components/Channel/Channel.js.map +1 -1
  18. package/lib/module/i18n/en.json +1 -1
  19. package/lib/module/i18n/es.json +74 -74
  20. package/lib/module/i18n/fr.json +74 -74
  21. package/lib/module/i18n/he.json +74 -74
  22. package/lib/module/i18n/hi.json +74 -74
  23. package/lib/module/i18n/it.json +74 -74
  24. package/lib/module/i18n/ja.json +74 -74
  25. package/lib/module/i18n/ko.json +74 -74
  26. package/lib/module/i18n/nl.json +74 -74
  27. package/lib/module/i18n/pt-BR.json +79 -0
  28. package/lib/module/i18n/ru.json +74 -74
  29. package/lib/module/i18n/tr.json +74 -74
  30. package/lib/module/version.json +1 -1
  31. package/lib/typescript/i18n/en.json +1 -1
  32. package/lib/typescript/i18n/es.json +74 -74
  33. package/lib/typescript/i18n/fr.json +74 -74
  34. package/lib/typescript/i18n/he.json +74 -74
  35. package/lib/typescript/i18n/hi.json +74 -74
  36. package/lib/typescript/i18n/it.json +74 -74
  37. package/lib/typescript/i18n/ja.json +74 -74
  38. package/lib/typescript/i18n/ko.json +74 -74
  39. package/lib/typescript/i18n/nl.json +74 -74
  40. package/lib/typescript/i18n/pt-BR.json +79 -0
  41. package/lib/typescript/i18n/ru.json +74 -74
  42. package/lib/typescript/i18n/tr.json +74 -74
  43. package/package.json +1 -1
  44. package/src/components/Channel/Channel.tsx +26 -19
  45. package/src/i18n/en.json +1 -1
  46. package/src/i18n/es.json +74 -74
  47. package/src/i18n/fr.json +74 -74
  48. package/src/i18n/he.json +74 -74
  49. package/src/i18n/hi.json +74 -74
  50. package/src/i18n/it.json +74 -74
  51. package/src/i18n/ja.json +74 -74
  52. package/src/i18n/ko.json +74 -74
  53. package/src/i18n/nl.json +74 -74
  54. package/src/i18n/pt-BR.json +79 -0
  55. package/src/i18n/ru.json +74 -74
  56. package/src/i18n/tr.json +74 -74
  57. package/src/version.json +1 -1
@@ -1,79 +1,79 @@
1
1
  {
2
- "1 Reply": "1 Ответ",
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.": "Достигнут предел максимального размера файла для загрузки. Загрузите файл размером менее {{MAX_FILE_SIZE_TO_UPLOAD_IN_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": "Поиск GIF",
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": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
74
- "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
75
- "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
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": "{{ user }} пишет",
78
- "🏙 Attachment...": "🏙 Вложение..."
77
+ "{{ user }} is typing": "",
78
+ "🏙 Attachment...": ""
79
79
  }
@@ -1,79 +1,79 @@
1
1
  {
2
- "1 Reply": "1 Cevap",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "1 Konu Yanıtı",
4
- "Allow access to your Gallery": "Galerinize erişime izin verin",
5
- "Allow camera access in device settings": "Cihaz ayarlarında kamera erişimine izin ver",
6
- "Also send to channel": "Kanala da gönder",
7
- "Are you sure you want to permanently delete this message?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
8
- "Are you sure?": "Emin misiniz?",
9
- "Block User": "Kullanıcıyı engelle",
10
- "Cancel": "İptal",
11
- "Cannot Flag Message": "Raporlama Başarısız",
12
- "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Yorumunuzun diğerlerini nasıl hissettirebileceğini düşünün ve topluluk kurallarımızı takip ettiğinizden emin olun",
13
- "Copy Message": "Mesajı Kopyala",
14
- "Delete": "Sil",
15
- "Delete Message": "Mesajı Sil",
16
- "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
17
- "Do you want to send a copy of this message to a moderator for further investigation?": "Detaylı inceleme için bu mesajın kopyasını moderatöre göndermek istiyor musunuz?",
18
- "Edit Message": "Mesajı Düzenle",
19
- "Editing Message": "Mesaj Düzenleniyor",
20
- "Emoji matching": "Emoji eşleştirme",
21
- "Empty message...": "Boş mesaj...",
22
- "Error loading": "Yükleme hatası",
23
- "Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
24
- "Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
25
- "Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
26
- "File type not supported": "Dosya türü desteklenmiyor",
27
- "Flag": "Raporla",
28
- "Flag Message": "Mesajı Raporla",
29
- "Flag action failed either due to a network issue or the message is already flagged": "Mesajın daha önce raporlanmış olması veya bir ağ bağlantısı sorunu nedeniyle raporlama işlemi başarısız oldu.",
30
- "How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
31
- "Instant Commands": "Anlık Komutlar",
32
- "Let's start chatting!": "Haydi sohbete başlayalım!",
33
- "Links are disabled": "Bağlantılar devre dışı",
34
- "Loading channels...": "Kanallar yükleniyor...",
35
- "Loading messages...": "Mesajlar yükleniyor...",
36
- "Loading...": "Yükleniyor...",
37
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Maksimum dosya boyutu yükleme sınırına ulaşıldı. Lütfen {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB'ın altında bir dosya yükleyin.",
38
- "Message Reactions": "Mesaj Tepkileri",
39
- "Message deleted": "Mesaj silindi",
40
- "Message flagged": "Mesaj işaretlendi",
41
- "Mute User": "Kullanıcıyı sessize al",
42
- "Not supported": "Desteklenmiyor",
43
- "Nothing yet...": "Henüz değil...",
44
- "Ok": "Tamam",
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": "Ayarları aç",
47
- "Photo": "Fotoğraf",
48
- "Photos and Videos": "Fotoğraflar ve Videolar",
49
- "Pin to Conversation": "Konuşmaya sabitle",
50
- "Pinned by": "Tarafından sabitlendi",
51
- "Please enable access to your photos and videos so you can share them.": "Paylaşım yapabilmek için lutfen fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
52
- "Please select a channel first": "Lütfen önce bir kanal seçiniz",
53
- "Reconnecting...": "Yeniden Bağlanılıyor...",
54
- "Reply": "Yanıtla",
55
- "Reply to Message": "Mesajı Yanıtla",
56
- "Resend": "Yeniden gönder",
57
- "Search GIFs": "GIF Ara",
58
- "Select More Photos": "Daha Fazla Fotoğraf Seçin",
59
- "Send Anyway": "Yine de Gönder",
60
- "Send a message": "Mesaj gönder",
61
- "Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
62
- "Slow mode ON": "Yavaş Mod Açık",
63
- "The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
64
- "Thread Reply": "Konu Yanıtı",
65
- "Unblock User": "Kullanıcının engelini kaldır",
66
- "Unknown User": "Bilinmeyen kullanıcı",
67
- "Unmute User": "Kullanıcının sesini aç",
68
- "Unpin from Conversation": "Sabitlemeyi kaldır",
69
- "Unread Messages": "Okunmamış Mesajlar",
70
- "Video": "Video",
71
- "You": "Sen",
72
- "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
74
- "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
75
- "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
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": "{{ user }} yazıyor",
78
- "🏙 Attachment...": "🏙 Ek..."
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.25.0",
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 [syncingChannel, setSyncingChannel] = useState(false);
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
- return;
631
+ await loadChannel();
632
+ channelLoaded = true;
632
633
  }
633
634
 
634
635
  if (messageId) {
635
636
  loadChannelAroundMessage({ messageId });
636
- return;
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
- messages: {
982
- id_gte: recentCurrentSetMsgId,
983
- limit: 25,
980
+ await channel.query(
981
+ {
982
+ messages: {
983
+ id_gte: recentCurrentSetMsgId,
984
+ limit: 25,
985
+ },
984
986
  },
985
- watch: true,
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 || syncingChannel) return;
1158
+ if (!channel || syncingChannelRef.current) return;
1159
+ if (!channel.initialized) return;
1157
1160
  hasOverlappingRecentMessagesRef.current = false;
1158
1161
  clearInterval(mergeSetsIntervalRef.current);
1159
- setSyncingChannel(true);
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
- setSyncingChannel(false);
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(connectionChangedHandler);
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": "1 respuesta",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "1 respuesta de hilo",
4
- "Allow access to your Gallery": "Permitir acceso a tu galería",
5
- "Allow camera access in device settings": "Permitir el acceso a la cámara en la configuración del dispositivo",
6
- "Also send to channel": "También enviar al canal",
7
- "Are you sure you want to permanently delete this message?": "¿Estás seguro de que deseas eliminar permanentemente este mensaje?",
8
- "Are you sure?": "¿Estás seguro?",
9
- "Block User": "Bloquear usuario",
10
- "Cancel": "Cancelar",
11
- "Cannot Flag Message": "No se puede reportar el mensaje",
12
- "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Considera cómo tu comentario podría hacer sentir a los demás y asegúrate de seguir nuestras Normas de la Comunidad",
13
- "Copy Message": "Copiar mensaje",
14
- "Delete": "Eliminar",
15
- "Delete Message": "Eliminar mensaje",
16
- "Device camera is used to take photos or videos.": "La cámara del dispositivo se utiliza para tomar fotografías o vídeos.",
17
- "Do you want to send a copy of this message to a moderator for further investigation?": "¿Deseas enviar una copia de este mensaje a un moderador para una investigación adicional?",
18
- "Edit Message": "Editar mensaje",
19
- "Editing Message": "Editando mensaje",
20
- "Emoji matching": "Coincidencia de emoji",
21
- "Empty message...": "Mensaje vacío...",
22
- "Error loading": "Error al cargar",
23
- "Error loading channel list...": "Error al cargar la lista de canales...",
24
- "Error loading messages for this channel...": "Error al cargar los mensajes de este canal...",
25
- "Error while loading, please reload/refresh": "Error al cargar, por favor recarga/actualiza",
26
- "File type not supported": "Tipo de archivo no admitido",
27
- "Flag": "Reportar",
28
- "Flag Message": "Reportar mensaje",
29
- "Flag action failed either due to a network issue or the message is already flagged": "El reporte falló debido a un problema de red o el mensaje ya fue reportado.",
30
- "How about sending your first message to a friend?": "¿Qué tal enviar tu primer mensaje a un amigo?",
31
- "Instant Commands": "Comandos instantáneos",
32
- "Let's start chatting!": "¡Empecemos a charlar!",
33
- "Links are disabled": "Los enlaces están desactivados",
34
- "Loading channels...": "Cargando canales...",
35
- "Loading messages...": "Cargando mensajes...",
36
- "Loading...": "Cargando...",
37
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "El archivo supera el tamaño máximo permitido. Por favor, selecciona un archivo menor a {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.",
38
- "Message Reactions": "Reacciones al mensaje",
39
- "Message deleted": "Mensaje eliminado",
40
- "Message flagged": "Mensaje reportado",
41
- "Mute User": "Silenciar usuario",
42
- "Not supported": "No admitido",
43
- "Nothing yet...": "Aún no hay nada...",
44
- "Ok": "Aceptar",
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": "Configuración abierta",
47
- "Photo": "Foto",
48
- "Photos and Videos": "Fotos y videos",
49
- "Pin to Conversation": "Fijar a la conversación",
50
- "Pinned by": "Fijado por",
51
- "Please enable access to your photos and videos so you can share them.": "Por favor, habilita el acceso a tus fotos y videos para poder compartirlos.",
52
- "Please select a channel first": "Por favor, selecciona primero un canal",
53
- "Reconnecting...": "Reconectando...",
54
- "Reply": "Responder",
55
- "Reply to Message": "Responder al mensaje",
56
- "Resend": "Reenviar",
57
- "Search GIFs": "Buscar GIFs",
58
- "Select More Photos": "Seleccionar más fotos",
59
- "Send Anyway": "Enviar de todos modos",
60
- "Send a message": "Enviar un mensaje",
61
- "Sending links is not allowed in this conversation": "No está permitido enviar enlaces en esta conversación",
62
- "Slow mode ON": "Modo lento ACTIVADO",
63
- "The message has been reported to a moderator.": "El mensaje ha sido reportado a un moderador.",
64
- "Thread Reply": "Respuesta de hilo",
65
- "Unblock User": "Desbloquear usuario",
66
- "Unknown User": "Usuario desconocido",
67
- "Unmute User": "Activar sonido del usuario",
68
- "Unpin from Conversation": "Desmarcar de la conversación",
69
- "Unread Messages": "Mensajes no leídos",
70
- "Video": "Video",
71
- "You": "",
72
- "You can't send messages in this channel": "No puedes enviar mensajes en este canal",
73
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} y {{ nonSelfUserLength }} más están escribiendo",
74
- "{{ index }} of {{ photoLength }}": "{{ index }} de {{ photoLength }}",
75
- "{{ replyCount }} Replies": "{{ replyCount }} Respuestas",
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": "{{ user }} está escribiendo",
78
- "🏙 Attachment...": "🏙 Adjunto..."
77
+ "{{ user }} is typing": "",
78
+ "🏙 Attachment...": ""
79
79
  }