stream-chat-react-native-core 5.22.1 → 5.22.2-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 (47) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +160 -163
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +1 -1
  4. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  5. package/lib/commonjs/components/MessageList/MessageList.js +30 -25
  6. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  7. package/lib/commonjs/i18n/en.json +1 -1
  8. package/lib/commonjs/i18n/fr.json +50 -50
  9. package/lib/commonjs/i18n/hi.json +50 -50
  10. package/lib/commonjs/i18n/it.json +50 -50
  11. package/lib/commonjs/i18n/nl.json +50 -50
  12. package/lib/commonjs/i18n/ru.json +50 -50
  13. package/lib/commonjs/i18n/tr.json +50 -50
  14. package/lib/commonjs/version.json +1 -1
  15. package/lib/module/components/Channel/Channel.js +160 -163
  16. package/lib/module/components/Channel/Channel.js.map +1 -1
  17. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +1 -1
  18. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  19. package/lib/module/components/MessageList/MessageList.js +30 -25
  20. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  21. package/lib/module/i18n/en.json +1 -1
  22. package/lib/module/i18n/fr.json +50 -50
  23. package/lib/module/i18n/hi.json +50 -50
  24. package/lib/module/i18n/it.json +50 -50
  25. package/lib/module/i18n/nl.json +50 -50
  26. package/lib/module/i18n/ru.json +50 -50
  27. package/lib/module/i18n/tr.json +50 -50
  28. package/lib/module/version.json +1 -1
  29. package/lib/typescript/i18n/en.json +1 -1
  30. package/lib/typescript/i18n/fr.json +50 -50
  31. package/lib/typescript/i18n/hi.json +50 -50
  32. package/lib/typescript/i18n/it.json +50 -50
  33. package/lib/typescript/i18n/nl.json +50 -50
  34. package/lib/typescript/i18n/ru.json +50 -50
  35. package/lib/typescript/i18n/tr.json +50 -50
  36. package/package.json +1 -1
  37. package/src/components/Channel/Channel.tsx +75 -45
  38. package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +8 -1
  39. package/src/components/MessageList/MessageList.tsx +28 -9
  40. package/src/i18n/en.json +1 -1
  41. package/src/i18n/fr.json +50 -50
  42. package/src/i18n/hi.json +50 -50
  43. package/src/i18n/it.json +50 -50
  44. package/src/i18n/nl.json +50 -50
  45. package/src/i18n/ru.json +50 -50
  46. package/src/i18n/tr.json +50 -50
  47. package/src/version.json +1 -1
@@ -4,73 +4,73 @@
4
4
  "Allow access to your Gallery": "Geef toegang tot uw galerij",
5
5
  "Allow camera access in device settings": "Sta cameratoegang toe in de apparaatinstellingen",
6
6
  "Also send to channel": "Stuur ook naar kanaal",
7
- "Are you sure you want to permanently delete this message?": "Weet u zeker dat u dit bericht definitief wilt verwijderen?",
8
- "Block User": "Blokkeer Gebruiker",
9
- "Cancel": "Annuleer",
10
- "Cannot Flag Message": "Kan bericht niet rapporteren",
11
- "Copy Message": "Bericht kopiëren",
12
- "Delete": "Verwijderen",
13
- "Delete Message": "Verwijder bericht",
7
+ "Are you sure you want to permanently delete this message?": "",
8
+ "Block User": "",
9
+ "Cancel": "",
10
+ "Cannot Flag Message": "",
11
+ "Copy Message": "",
12
+ "Delete": "",
13
+ "Delete Message": "",
14
14
  "Device camera is used to take photos or videos.": "De camera van het apparaat wordt gebruikt om foto's of video's te maken.",
15
- "Do you want to send a copy of this message to a moderator for further investigation?": "Wil je een kopie van dit bericht naar een moderator sturen voor verder onderzoek?",
16
- "Edit Message": "Pas bericht aan",
15
+ "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
+ "Edit Message": "",
17
17
  "Editing Message": "Bericht aanpassen",
18
- "Emoji matching": "Emoji-overeenkomsten",
19
- "Empty message...": "Leeg bericht...",
20
- "Error loading": "Probleem bij het laden",
21
- "Error loading channel list...": "Probleem bij het laden van de kanalen...",
22
- "Error loading messages for this channel...": "Probleem bij het laden van de berichten in dit kanaal...",
23
- "Error while loading, please reload/refresh": "Probleem bij het laden, probeer opnieuw",
24
- "File type not supported": "Bestandstype niet ondersteund",
25
- "Flag": "Markeer",
26
- "Flag Message": "Markeer bericht",
27
- "Flag action failed either due to a network issue or the message is already flagged": "Rapporteren mislukt door een netwerk fout of het berich is al gerapporteerd",
28
- "How about sending your first message to a friend?": "Wat dacht je ervan om je eerste bericht naar een vriend te sturen?",
29
- "Instant Commands": "Directe Opdrachten",
30
- "Let's start chatting!": "Laten we beginnen met chatten!",
18
+ "Emoji matching": "",
19
+ "Empty message...": "",
20
+ "Error loading": "",
21
+ "Error loading channel list...": "",
22
+ "Error loading messages for this channel...": "",
23
+ "Error while loading, please reload/refresh": "",
24
+ "File type not supported": "",
25
+ "Flag": "",
26
+ "Flag Message": "",
27
+ "Flag action failed either due to a network issue or the message is already flagged": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "",
30
+ "Let's start chatting!": "",
31
31
  "Links are disabled": "Het versturen van links staat uit",
32
- "Loading channels...": "Kanalen aan het laden...",
33
- "Loading messages...": "Berichten aan het laden...",
34
- "Loading...": "Aan het laden...",
32
+ "Loading channels...": "",
33
+ "Loading messages...": "",
34
+ "Loading...": "",
35
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Maximale uploadlimiet voor bestandsgrootte bereikt. Upload een bestand van minder dan {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.",
36
36
  "Message Reactions": "Bericht Reacties",
37
- "Message deleted": "Bericht verwijderd",
38
- "Message flagged": "Bericht gemarkeerd",
39
- "Mute User": "Gebruiker dempen",
40
- "Not supported": "niet ondersteund",
41
- "Nothing yet...": "Nog niets...",
42
- "Ok": "Oké",
37
+ "Message deleted": "",
38
+ "Message flagged": "",
39
+ "Mute User": "",
40
+ "Not supported": "",
41
+ "Nothing yet...": "",
42
+ "Ok": "",
43
43
  "Only visible to you": "Alleen zichtbaar voor jou",
44
44
  "Open Settings": "Open instellingen",
45
- "Photo": "Foto",
45
+ "Photo": "",
46
46
  "Photos and Videos": "Foto's en video's",
47
- "Pin to Conversation": "Vastmaken aan gesprek",
47
+ "Pin to Conversation": "",
48
48
  "Pinned by": "Vastgemaakt door",
49
49
  "Please enable access to your photos and videos so you can share them.": "Schakel toegang tot uw foto's en video's in zodat u ze kunt delen.",
50
50
  "Please select a channel first": "Selecteer eerst een kanaal",
51
- "Reconnecting...": "Opnieuw Verbinding Maken...",
52
- "Reply": "Antwoord",
53
- "Reply to Message": "Beantwoord bericht",
54
- "Resend": "Opnieuw versturen",
55
- "Search GIFs": "Zoek GIF's",
51
+ "Reconnecting...": "",
52
+ "Reply": "",
53
+ "Reply to Message": "",
54
+ "Resend": "",
55
+ "Search GIFs": "",
56
56
  "Select More Photos": "Selecteer Meer foto's",
57
- "Send a message": "Stuur een bericht",
57
+ "Send a message": "",
58
58
  "Sending links is not allowed in this conversation": "In dit gesprek is het niet toegestaan links te versturen",
59
- "Slow mode ON": "Langzame modus aan",
60
- "The message has been reported to a moderator.": "Het bericht is gerapporteerd aan een moderator.",
61
- "Thread Reply": "Discussie beantwoorden",
62
- "Unblock User": "Deblokkeer gebruiker",
59
+ "Slow mode ON": "",
60
+ "The message has been reported to a moderator.": "",
61
+ "Thread Reply": "",
62
+ "Unblock User": "",
63
63
  "Unknown User": "Onbekende gebruiker",
64
- "Unmute User": "Dempen van gebruiker opheffen",
65
- "Unpin from Conversation": "Losmaken van gesprek",
64
+ "Unmute User": "",
65
+ "Unpin from Conversation": "",
66
66
  "Unread Messages": "Ongelezen Berichten",
67
- "Video": "Video",
68
- "You": "U",
67
+ "Video": "",
68
+ "You": "",
69
69
  "You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
72
72
  "{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Discussiereacties",
74
- "{{ user }} is typing": "{{ user }} is aan het typen",
75
- "🏙 Attachment...": "🏙 Bijlage..."
74
+ "{{ user }} is typing": "",
75
+ "🏙 Attachment...": ""
76
76
  }
@@ -4,73 +4,73 @@
4
4
  "Allow access to your Gallery": "Разрешить доступ к вашей галерее",
5
5
  "Allow camera access in device settings": "Разрешите доступ к камере в настройках устройства.",
6
6
  "Also send to channel": "Также отправить на канал",
7
- "Are you sure you want to permanently delete this message?": "Вы действительно хотите удалить это сообщение без возможности восстановления?",
8
- "Block User": "Заблокировать пользователя",
9
- "Cancel": "Отмена",
10
- "Cannot Flag Message": "Невозможно пожаловаться на сообщение",
11
- "Copy Message": "Копировать сообщение",
12
- "Delete": "удалять",
13
- "Delete Message": "Удалить сообщение",
7
+ "Are you sure you want to permanently delete this message?": "",
8
+ "Block User": "",
9
+ "Cancel": "",
10
+ "Cannot Flag Message": "",
11
+ "Copy Message": "",
12
+ "Delete": "",
13
+ "Delete Message": "",
14
14
  "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
15
- "Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
16
- "Edit Message": "Редактировать сообщение",
15
+ "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
+ "Edit Message": "",
17
17
  "Editing Message": "Редактирование сообщения",
18
- "Emoji matching": "Соответствие эмодзи",
19
- "Empty message...": "Пустое сообщение...",
20
- "Error loading": "Ошибка при загрузке",
21
- "Error loading channel list...": "Ошибка загрузки списка каналов...",
22
- "Error loading messages for this channel...": "Ошибка загрузки сообщений для этого канала...",
23
- "Error while loading, please reload/refresh": "Ошибка загрузки, пожалуйста перезагрузите или обновите",
24
- "File type not supported": "Тип файла не поддерживается",
25
- "Flag": "Пометить",
26
- "Flag Message": "Пометить сообщение",
27
- "Flag action failed either due to a network issue or the message is already flagged": "Не удалось отправить жалобу. Возможные причины: проблема с подключением к интернету или ваша жалоба уже была принята.",
28
- "How about sending your first message to a friend?": "Как насчет отправки первого сообщения другу?",
29
- "Instant Commands": "Мгновенные Команды",
30
- "Let's start chatting!": "Давайте начнем общаться!",
18
+ "Emoji matching": "",
19
+ "Empty message...": "",
20
+ "Error loading": "",
21
+ "Error loading channel list...": "",
22
+ "Error loading messages for this channel...": "",
23
+ "Error while loading, please reload/refresh": "",
24
+ "File type not supported": "",
25
+ "Flag": "",
26
+ "Flag Message": "",
27
+ "Flag action failed either due to a network issue or the message is already flagged": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "",
30
+ "Let's start chatting!": "",
31
31
  "Links are disabled": "Ссылки отключены",
32
- "Loading channels...": "Загружаю каналы...",
33
- "Loading messages...": "Загружаю сообщения...",
34
- "Loading...": "Загружаю...",
32
+ "Loading channels...": "",
33
+ "Loading messages...": "",
34
+ "Loading...": "",
35
35
  "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}} МБ.",
36
36
  "Message Reactions": "Сообщения Реакции",
37
- "Message deleted": "Сообщение удалено",
38
- "Message flagged": "Сообщение отмечено",
39
- "Mute User": "Отключить пользователя",
40
- "Not supported": "не поддерживается",
41
- "Nothing yet...": "Пока ничего нет...",
42
- "Ok": "",
37
+ "Message deleted": "",
38
+ "Message flagged": "",
39
+ "Mute User": "",
40
+ "Not supported": "",
41
+ "Nothing yet...": "",
42
+ "Ok": "",
43
43
  "Only visible to you": "Видно только вам",
44
44
  "Open Settings": "Открыть настройки",
45
- "Photo": "Фото",
45
+ "Photo": "",
46
46
  "Photos and Videos": "Фото и видео",
47
- "Pin to Conversation": "Закрепить к беседе",
47
+ "Pin to Conversation": "",
48
48
  "Pinned by": "Закреплено пользователем",
49
49
  "Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
50
50
  "Please select a channel first": "Пожалуйста, сначала выберите канал",
51
- "Reconnecting...": "Переподключение...",
52
- "Reply": "Ответить",
53
- "Reply to Message": "Ответить на сообщение",
54
- "Resend": "Отправить",
55
- "Search GIFs": "Поиск GIF",
51
+ "Reconnecting...": "",
52
+ "Reply": "",
53
+ "Reply to Message": "",
54
+ "Resend": "",
55
+ "Search GIFs": "",
56
56
  "Select More Photos": "Выбрать больше фотографий",
57
- "Send a message": "Отправить сообщение",
57
+ "Send a message": "",
58
58
  "Sending links is not allowed in this conversation": "Отправка ссылок недоступна в этом чате",
59
- "Slow mode ON": "Медленный режим включен",
60
- "The message has been reported to a moderator.": "Сообщение отправлено модератору.",
61
- "Thread Reply": "Тема Ответить",
62
- "Unblock User": "Разблокировать пользователя",
59
+ "Slow mode ON": "",
60
+ "The message has been reported to a moderator.": "",
61
+ "Thread Reply": "",
62
+ "Unblock User": "",
63
63
  "Unknown User": "Неизвестный пользователь",
64
- "Unmute User": "Включить микрофон",
65
- "Unpin from Conversation": "Открепить от беседы",
64
+ "Unmute User": "",
65
+ "Unpin from Conversation": "",
66
66
  "Unread Messages": "Непрочитанные Сообщения",
67
- "Video": "видео",
68
- "You": "Вы",
67
+ "Video": "",
68
+ "You": "",
69
69
  "You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
72
72
  "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
74
- "{{ user }} is typing": "{{ user }} пишет",
75
- "🏙 Attachment...": "🏙 Вложение..."
74
+ "{{ user }} is typing": "",
75
+ "🏙 Attachment...": ""
76
76
  }
@@ -4,73 +4,73 @@
4
4
  "Allow access to your Gallery": "Galerinize erişime izin verin",
5
5
  "Allow camera access in device settings": "Cihaz ayarlarında kamera erişimine izin ver",
6
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
- "Block User": "Kullanıcıyı engelle",
9
- "Cancel": "İptal",
10
- "Cannot Flag Message": "Raporlama Başarısız",
11
- "Copy Message": "Mesajı Kopyala",
12
- "Delete": "Sil",
13
- "Delete Message": "Mesajı Sil",
7
+ "Are you sure you want to permanently delete this message?": "",
8
+ "Block User": "",
9
+ "Cancel": "",
10
+ "Cannot Flag Message": "",
11
+ "Copy Message": "",
12
+ "Delete": "",
13
+ "Delete Message": "",
14
14
  "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
15
- "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?",
16
- "Edit Message": "Mesajı Düzenle",
15
+ "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
+ "Edit Message": "",
17
17
  "Editing Message": "Mesaj Düzenleniyor",
18
- "Emoji matching": "Emoji eşleştirme",
19
- "Empty message...": "Boş mesaj...",
20
- "Error loading": "Yükleme hatası",
21
- "Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
22
- "Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
23
- "Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
24
- "File type not supported": "Dosya türü desteklenmiyor",
25
- "Flag": "Raporla",
26
- "Flag Message": "Mesajı Raporla",
27
- "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.",
28
- "How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
29
- "Instant Commands": "Anlık Komutlar",
30
- "Let's start chatting!": "Haydi sohbete başlayalım!",
18
+ "Emoji matching": "",
19
+ "Empty message...": "",
20
+ "Error loading": "",
21
+ "Error loading channel list...": "",
22
+ "Error loading messages for this channel...": "",
23
+ "Error while loading, please reload/refresh": "",
24
+ "File type not supported": "",
25
+ "Flag": "",
26
+ "Flag Message": "",
27
+ "Flag action failed either due to a network issue or the message is already flagged": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "",
30
+ "Let's start chatting!": "",
31
31
  "Links are disabled": "Bağlantılar devre dışı",
32
- "Loading channels...": "Kanallar yükleniyor...",
33
- "Loading messages...": "Mesajlar yükleniyor...",
34
- "Loading...": "Yükleniyor...",
32
+ "Loading channels...": "",
33
+ "Loading messages...": "",
34
+ "Loading...": "",
35
35
  "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.",
36
36
  "Message Reactions": "Mesaj Tepkileri",
37
- "Message deleted": "Mesaj silindi",
38
- "Message flagged": "Mesaj işaretlendi",
39
- "Mute User": "Kullanıcıyı sessize al",
40
- "Not supported": "Desteklenmiyor",
41
- "Nothing yet...": "Henüz değil...",
42
- "Ok": "Tamam",
37
+ "Message deleted": "",
38
+ "Message flagged": "",
39
+ "Mute User": "",
40
+ "Not supported": "",
41
+ "Nothing yet...": "",
42
+ "Ok": "",
43
43
  "Only visible to you": "Sadece siz görebilirsiniz",
44
44
  "Open Settings": "Ayarları aç",
45
- "Photo": "Fotoğraf",
45
+ "Photo": "",
46
46
  "Photos and Videos": "Fotoğraflar ve Videolar",
47
- "Pin to Conversation": "Konuşmaya sabitle",
47
+ "Pin to Conversation": "",
48
48
  "Pinned by": "Tarafından sabitlendi",
49
49
  "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.",
50
50
  "Please select a channel first": "Lütfen önce bir kanal seçiniz",
51
- "Reconnecting...": "Yeniden Bağlanılıyor...",
52
- "Reply": "Yanıtla",
53
- "Reply to Message": "Mesajı Yanıtla",
54
- "Resend": "Yeniden gönder",
55
- "Search GIFs": "GIF Ara",
51
+ "Reconnecting...": "",
52
+ "Reply": "",
53
+ "Reply to Message": "",
54
+ "Resend": "",
55
+ "Search GIFs": "",
56
56
  "Select More Photos": "Daha Fazla Fotoğraf Seçin",
57
- "Send a message": "Mesaj gönder",
57
+ "Send a message": "",
58
58
  "Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
59
- "Slow mode ON": "Yavaş Mod Açık",
60
- "The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
61
- "Thread Reply": "Konu Yanıtı",
62
- "Unblock User": "Kullanıcının engelini kaldır",
59
+ "Slow mode ON": "",
60
+ "The message has been reported to a moderator.": "",
61
+ "Thread Reply": "",
62
+ "Unblock User": "",
63
63
  "Unknown User": "Bilinmeyen kullanıcı",
64
- "Unmute User": "Kullanıcının sesini aç",
65
- "Unpin from Conversation": "Sabitlemeyi kaldır",
64
+ "Unmute User": "",
65
+ "Unpin from Conversation": "",
66
66
  "Unread Messages": "Okunmamış Mesajlar",
67
- "Video": "Video",
68
- "You": "Sen",
67
+ "Video": "",
68
+ "You": "",
69
69
  "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
72
72
  "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
73
73
  "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
74
- "{{ user }} is typing": "{{ user }} yazıyor",
75
- "🏙 Attachment...": "🏙 Ek..."
74
+ "{{ user }} is typing": "",
75
+ "🏙 Attachment...": ""
76
76
  }
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.22.1",
4
+ "version": "5.22.2-beta.1",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -588,6 +588,13 @@ const ChannelWithContext = <
588
588
  */
589
589
  const [hasNoMoreRecentMessagesToLoad, setHasNoMoreRecentMessagesToLoad] = useState(true);
590
590
 
591
+ /**
592
+ * messages array is tracked in ref so that
593
+ * functions can be passed to message list context without any change due to dependency
594
+ */
595
+ const messagesRef = useRef(messages);
596
+ messagesRef.current = messages;
597
+
591
598
  const { setTargetedMessage, targetedMessage } = useTargetedMessage();
592
599
 
593
600
  /**
@@ -879,13 +886,14 @@ const ChannelWithContext = <
879
886
  * @param messageId If undefined, channel will be loaded at most recent message.
880
887
  */
881
888
  const loadChannelAroundMessage: ChannelContextValue<StreamChatGenerics>['loadChannelAroundMessage'] =
882
- ({ messageId }) =>
889
+ ({ messageId: messageIdToLoadAround }) =>
883
890
  channelQueryCallRef.current(
884
891
  async () => {
885
- setHasNoMoreRecentMessagesToLoad(false); // we are jumping to a message, hence we do not know for sure anymore if there are no more recent messages
886
892
  setLoading(true);
887
- if (messageId) {
888
- await channel.state.loadMessageIntoState(messageId);
893
+ if (messageIdToLoadAround) {
894
+ setHasNoMoreRecentMessagesToLoad(false); // we are jumping to a message, hence we do not know for sure anymore if there are no more recent messages
895
+ channel.state.setIsUpToDate(false);
896
+ await channel.state.loadMessageIntoState(messageIdToLoadAround);
889
897
  } else {
890
898
  await channel.state.loadMessageIntoState('latest');
891
899
  channel.state.setIsUpToDate(true);
@@ -893,8 +901,8 @@ const ChannelWithContext = <
893
901
  setLoading(false);
894
902
  },
895
903
  () => {
896
- if (messageId) {
897
- setTargetedMessage(messageId);
904
+ if (messageIdToLoadAround) {
905
+ setTargetedMessage(messageIdToLoadAround);
898
906
  }
899
907
  },
900
908
  );
@@ -1509,55 +1517,70 @@ const ChannelWithContext = <
1509
1517
  ),
1510
1518
  ).current;
1511
1519
 
1512
- const loadMore: PaginatedMessageListContextValue<StreamChatGenerics>['loadMore'] = async (
1513
- limit = 20,
1514
- ) => {
1515
- if (loadingMore || hasMore === false) {
1516
- return;
1517
- }
1518
- setLoadingMore(true);
1520
+ /**
1521
+ * This function loads more messages before the first message in current channel state.
1522
+ */
1523
+ const loadMore = useCallback<PaginatedMessageListContextValue<StreamChatGenerics>['loadMore']>(
1524
+ async (limit = 20) => {
1525
+ if (loadingMore || hasMore === false) {
1526
+ return;
1527
+ }
1528
+ setLoadingMore(true);
1519
1529
 
1520
- if (!messages.length) {
1521
- return setLoadingMore(false);
1522
- }
1530
+ const currentMessages = messagesRef.current;
1523
1531
 
1524
- const oldestMessage = messages && messages[0];
1532
+ if (!currentMessages.length) {
1533
+ return setLoadingMore(false);
1534
+ }
1525
1535
 
1526
- if (oldestMessage && oldestMessage.status !== MessageStatusTypes.RECEIVED) {
1527
- return setLoadingMore(false);
1528
- }
1536
+ const oldestMessage = currentMessages && currentMessages[0];
1529
1537
 
1530
- const oldestID = oldestMessage && oldestMessage.id;
1538
+ if (oldestMessage && oldestMessage.status !== MessageStatusTypes.RECEIVED) {
1539
+ return setLoadingMore(false);
1540
+ }
1531
1541
 
1532
- try {
1533
- if (channel) {
1534
- const queryResponse = await channel.query({
1535
- messages: { id_lt: oldestID, limit },
1536
- });
1542
+ const oldestID = oldestMessage && oldestMessage.id;
1537
1543
 
1538
- const updatedHasMore = queryResponse.messages.length === limit;
1539
- loadMoreFinished(updatedHasMore, channel.state.messages);
1540
- }
1541
- } catch (err) {
1542
- if (err instanceof Error) {
1543
- setError(err);
1544
- } else {
1545
- setError(true);
1544
+ try {
1545
+ if (channel) {
1546
+ const queryResponse = await channel.query({
1547
+ messages: { id_lt: oldestID, limit },
1548
+ });
1549
+
1550
+ const updatedHasMore = queryResponse.messages.length === limit;
1551
+ loadMoreFinished(updatedHasMore, channel.state.messages);
1552
+ }
1553
+ } catch (err) {
1554
+ if (err instanceof Error) {
1555
+ setError(err);
1556
+ } else {
1557
+ setError(true);
1558
+ }
1559
+ setLoadingMore(false);
1560
+ throw err;
1546
1561
  }
1547
- setLoadingMore(false);
1548
- throw err;
1549
- }
1550
- };
1562
+ },
1563
+ /*
1564
+ * This function is passed to useCreatePaginatedMessageListContext
1565
+ * Where the deps are [channelId, hasMore, loadingMoreRecent, loadingMore]
1566
+ * and only those deps should be used here because of that
1567
+ */
1568
+ [channelId, hasMore, loadingMore],
1569
+ );
1551
1570
 
1552
- const loadMoreRecent: PaginatedMessageListContextValue<StreamChatGenerics>['loadMoreRecent'] =
1571
+ /**
1572
+ * This function loads more messages after the most recent message in current channel state.
1573
+ */
1574
+ const loadMoreRecent = useCallback<
1575
+ PaginatedMessageListContextValue<StreamChatGenerics>['loadMoreRecent']
1576
+ >(
1553
1577
  async (limit = 5) => {
1554
1578
  if (hasNoMoreRecentMessagesToLoad) {
1555
1579
  return;
1556
1580
  }
1557
-
1558
1581
  setLoadingMoreRecent(true);
1559
-
1560
- const recentMessage = messages[messages.length - 1];
1582
+ const currentMessages = messagesRef.current;
1583
+ const recentMessage = currentMessages[currentMessages.length - 1];
1561
1584
 
1562
1585
  if (recentMessage?.status !== MessageStatusTypes.RECEIVED) {
1563
1586
  setLoadingMoreRecent(false);
@@ -1566,14 +1589,14 @@ const ChannelWithContext = <
1566
1589
 
1567
1590
  try {
1568
1591
  if (channel) {
1569
- const state = await channel.query({
1592
+ const queryResponse = await channel.query({
1570
1593
  messages: {
1571
1594
  id_gte: recentMessage.id,
1572
1595
  limit,
1573
1596
  },
1574
1597
  watch: true,
1575
1598
  });
1576
- setHasNoMoreRecentMessagesToLoad(state.messages.length < limit);
1599
+ setHasNoMoreRecentMessagesToLoad(queryResponse.messages.length < limit);
1577
1600
  loadMoreRecentFinished(channel.state.messages);
1578
1601
  }
1579
1602
  } catch (err) {
@@ -1586,7 +1609,14 @@ const ChannelWithContext = <
1586
1609
  setLoadingMoreRecent(false);
1587
1610
  throw err;
1588
1611
  }
1589
- };
1612
+ },
1613
+ /*
1614
+ * This function is passed to useCreatePaginatedMessageListContext
1615
+ * Where the deps are [channelId, hasMore, loadingMoreRecent, loadingMore, hasNoMoreRecentMessagesToLoad]
1616
+ * and and only those deps should be used here because of that
1617
+ */
1618
+ [channelId, hasNoMoreRecentMessagesToLoad],
1619
+ );
1590
1620
 
1591
1621
  // hard limit to prevent you from scrolling faster than 1 page per 2 seconds
1592
1622
  const loadMoreRecentFinished = useRef(
@@ -34,7 +34,14 @@ export const useCreatePaginatedMessageListContext = <
34
34
  setLoadingMore,
35
35
  setLoadingMoreRecent,
36
36
  }),
37
- [channelId, hasMore, loadingMoreRecent, loadingMore, messagesStr],
37
+ [
38
+ channelId,
39
+ hasMore,
40
+ loadingMoreRecent,
41
+ loadingMore,
42
+ hasNoMoreRecentMessagesToLoad,
43
+ messagesStr,
44
+ ],
38
45
  );
39
46
 
40
47
  return paginatedMessagesContext;