stream-chat-react-native-core 5.27.0-beta.10 → 5.27.0-beta.12
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/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +100 -37
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js +3 -1
- package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +39 -21
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/i18n/es.json +22 -22
- package/lib/commonjs/i18n/fr.json +22 -22
- package/lib/commonjs/i18n/he.json +22 -22
- package/lib/commonjs/i18n/hi.json +22 -22
- package/lib/commonjs/i18n/it.json +22 -22
- package/lib/commonjs/i18n/ja.json +22 -22
- package/lib/commonjs/i18n/ko.json +22 -22
- package/lib/commonjs/i18n/nl.json +22 -22
- package/lib/commonjs/i18n/pt-BR.json +22 -22
- package/lib/commonjs/i18n/ru.json +22 -22
- package/lib/commonjs/i18n/tr.json +22 -22
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js +21 -0
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js.map +1 -0
- package/lib/commonjs/store/mappers/mapChannelToStorable.js +63 -0
- package/lib/commonjs/store/mappers/mapChannelToStorable.js.map +1 -0
- package/lib/commonjs/utils/DBSyncManager.js +73 -68
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +100 -37
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/Chat/hooks/useSyncDatabase.js +3 -1
- package/lib/module/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +39 -21
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/i18n/es.json +22 -22
- package/lib/module/i18n/fr.json +22 -22
- package/lib/module/i18n/he.json +22 -22
- package/lib/module/i18n/hi.json +22 -22
- package/lib/module/i18n/it.json +22 -22
- package/lib/module/i18n/ja.json +22 -22
- package/lib/module/i18n/ko.json +22 -22
- package/lib/module/i18n/nl.json +22 -22
- package/lib/module/i18n/pt-BR.json +22 -22
- package/lib/module/i18n/ru.json +22 -22
- package/lib/module/i18n/tr.json +22 -22
- package/lib/module/store/apis/upsertChannelDataFromChannel.js +21 -0
- package/lib/module/store/apis/upsertChannelDataFromChannel.js.map +1 -0
- package/lib/module/store/mappers/mapChannelToStorable.js +63 -0
- package/lib/module/store/mappers/mapChannelToStorable.js.map +1 -0
- package/lib/module/utils/DBSyncManager.js +73 -68
- package/lib/module/utils/DBSyncManager.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts +4 -2
- package/lib/typescript/i18n/es.json +22 -22
- package/lib/typescript/i18n/fr.json +22 -22
- package/lib/typescript/i18n/he.json +22 -22
- package/lib/typescript/i18n/hi.json +22 -22
- package/lib/typescript/i18n/it.json +22 -22
- package/lib/typescript/i18n/ja.json +22 -22
- package/lib/typescript/i18n/ko.json +22 -22
- package/lib/typescript/i18n/nl.json +22 -22
- package/lib/typescript/i18n/pt-BR.json +22 -22
- package/lib/typescript/i18n/ru.json +22 -22
- package/lib/typescript/i18n/tr.json +22 -22
- package/lib/typescript/store/apis/upsertChannelDataFromChannel.d.ts +6 -0
- package/lib/typescript/store/mappers/mapChannelToStorable.d.ts +4 -0
- package/lib/typescript/utils/DBSyncManager.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +1 -1
- package/src/components/Chat/hooks/handleEventToSyncDB.ts +132 -46
- package/src/components/Chat/hooks/useSyncDatabase.ts +1 -1
- package/src/components/ImageGallery/ImageGallery.tsx +25 -2
- package/src/i18n/es.json +22 -22
- package/src/i18n/fr.json +22 -22
- package/src/i18n/he.json +22 -22
- package/src/i18n/hi.json +22 -22
- package/src/i18n/it.json +22 -22
- package/src/i18n/ja.json +22 -22
- package/src/i18n/ko.json +22 -22
- package/src/i18n/nl.json +22 -22
- package/src/i18n/pt-BR.json +22 -22
- package/src/i18n/ru.json +22 -22
- package/src/i18n/tr.json +22 -22
- package/src/store/apis/upsertChannelDataFromChannel.ts +25 -0
- package/src/store/mappers/mapChannelToStorable.ts +68 -0
- package/src/utils/DBSyncManager.ts +7 -3
- package/src/version.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Resposta",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
|
-
"Also send to channel": "
|
|
6
|
+
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "Tem certeza de que deseja excluir esta mensagem permanentemente?",
|
|
8
8
|
"Are you sure?": "",
|
|
9
9
|
"Block User": "Bloquear Usuário",
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"Edit Message": "Editar Mensagem",
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "",
|
|
21
|
+
"Empty message...": "Mensagem vazia...",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "Erro ao carregar lista de canais...",
|
|
24
24
|
"Error loading messages for this channel...": "Erro ao carregar mensagens para este canal...",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "Erro ao carregar, por favor recarregue/atualize",
|
|
26
26
|
"File type not supported": "",
|
|
27
27
|
"Flag": "Reportar",
|
|
28
28
|
"Flag Message": "Reportar Mensagem",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "A ação para reportar a mensagem falhou devido a um problema de rede ou a mensagem já foi reportada.",
|
|
30
|
-
"How about sending your first message to a friend?": "",
|
|
30
|
+
"How about sending your first message to a friend?": "Que tal enviar sua primeira mensagem para um amigo?",
|
|
31
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.": "",
|
|
32
|
+
"Let's start chatting!": "Vamos começar a conversar!",
|
|
33
|
+
"Links are disabled": "Links estão desabilitados",
|
|
34
|
+
"Loading channels...": "Carregando canais...",
|
|
35
|
+
"Loading messages...": "Carregando mensagens...",
|
|
36
|
+
"Loading...": "Carregando...",
|
|
37
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Limite máximo de tamanho de arquivo atingido. Por favor, faça o upload de um arquivo abaixo de {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.",
|
|
38
38
|
"Message Reactions": "Reações à Mensagem",
|
|
39
39
|
"Message deleted": "Mensagem excluída",
|
|
40
40
|
"Message flagged": "Mensagem sinalizada",
|
|
41
41
|
"Mute User": "Silenciar Usuário",
|
|
42
42
|
"Not supported": "",
|
|
43
|
-
"Nothing yet...": "",
|
|
43
|
+
"Nothing yet...": "Nada ainda...",
|
|
44
44
|
"Ok": "Ok",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
@@ -54,26 +54,26 @@
|
|
|
54
54
|
"Reply": "Responder",
|
|
55
55
|
"Reply to Message": "",
|
|
56
56
|
"Resend": "Reenviar",
|
|
57
|
-
"Search GIFs": "",
|
|
57
|
+
"Search GIFs": "Pesquisar GIFs",
|
|
58
58
|
"Select More Photos": "",
|
|
59
59
|
"Send Anyway": "",
|
|
60
|
-
"Send a message": "",
|
|
61
|
-
"Sending links is not allowed in this conversation": "",
|
|
62
|
-
"Slow mode ON": "",
|
|
60
|
+
"Send a message": "Enviar uma mensagem",
|
|
61
|
+
"Sending links is not allowed in this conversation": "Não é permitido enviar links nesta conversa",
|
|
62
|
+
"Slow mode ON": "Modo Lento ATIVADO",
|
|
63
63
|
"The message has been reported to a moderator.": "A mensagem foi relatada a um moderador.",
|
|
64
64
|
"Thread Reply": "Respostas de Tópico",
|
|
65
65
|
"Unblock User": "Desbloquear Usuário",
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "Remover usuário do modo silencioso",
|
|
68
68
|
"Unpin from Conversation": "Desmarcar como fixado na conversa",
|
|
69
|
-
"Unread Messages": "",
|
|
69
|
+
"Unread Messages": "Mensagens não lidas",
|
|
70
70
|
"Video": "Vídeo",
|
|
71
|
-
"You": "",
|
|
71
|
+
"You": "Você",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e mais {{ nonSelfUserLength }} pessoa(s) estão digitando",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
-
"{{ replyCount }} Replies": "",
|
|
75
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Respostas",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} está digitando",
|
|
78
|
-
"🏙 Attachment...": ""
|
|
78
|
+
"🏙 Attachment...": "🏙 Anexo..."
|
|
79
79
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Ответ",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
|
-
"Also send to channel": "
|
|
6
|
+
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "Вы действительно хотите удалить это сообщение без возможности восстановления?",
|
|
8
8
|
"Are you sure?": "",
|
|
9
9
|
"Block User": "Заблокировать пользователя",
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"Edit Message": "Редактировать сообщение",
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "",
|
|
21
|
+
"Empty message...": "Пустое сообщение...",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "Ошибка загрузки списка каналов...",
|
|
24
24
|
"Error loading messages for this channel...": "Ошибка загрузки сообщений для этого канала...",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "Ошибка загрузки, пожалуйста перезагрузите или обновите",
|
|
26
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
|
-
"How about sending your first message to a friend?": "",
|
|
30
|
+
"How about sending your first message to a friend?": "Как насчет отправки первого сообщения другу?",
|
|
31
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.": "",
|
|
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
38
|
"Message Reactions": "Сообщения Реакции",
|
|
39
39
|
"Message deleted": "Сообщение удалено",
|
|
40
40
|
"Message flagged": "Сообщение отмечено",
|
|
41
41
|
"Mute User": "Отключить пользователя",
|
|
42
42
|
"Not supported": "",
|
|
43
|
-
"Nothing yet...": "",
|
|
43
|
+
"Nothing yet...": "Пока ничего нет...",
|
|
44
44
|
"Ok": "Oк",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
@@ -54,26 +54,26 @@
|
|
|
54
54
|
"Reply": "Ответить",
|
|
55
55
|
"Reply to Message": "",
|
|
56
56
|
"Resend": "Отправить",
|
|
57
|
-
"Search GIFs": "",
|
|
57
|
+
"Search GIFs": "Поиск GIF",
|
|
58
58
|
"Select More Photos": "",
|
|
59
59
|
"Send Anyway": "",
|
|
60
|
-
"Send a message": "",
|
|
61
|
-
"Sending links is not allowed in this conversation": "",
|
|
62
|
-
"Slow mode ON": "",
|
|
60
|
+
"Send a message": "Отправить сообщение",
|
|
61
|
+
"Sending links is not allowed in this conversation": "Отправка ссылок недоступна в этом чате",
|
|
62
|
+
"Slow mode ON": "Медленный режим включен",
|
|
63
63
|
"The message has been reported to a moderator.": "Сообщение отправлено модератору.",
|
|
64
64
|
"Thread Reply": "Тема Ответить",
|
|
65
65
|
"Unblock User": "Разблокировать пользователя",
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "Включить микрофон",
|
|
68
68
|
"Unpin from Conversation": "Открепить от беседы",
|
|
69
|
-
"Unread Messages": "",
|
|
69
|
+
"Unread Messages": "Непрочитанные Сообщения",
|
|
70
70
|
"Video": "видео",
|
|
71
|
-
"You": "",
|
|
71
|
+
"You": "Вы",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
-
"{{ replyCount }} Replies": "",
|
|
75
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Ответов",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} пишет",
|
|
78
|
-
"🏙 Attachment...": ""
|
|
78
|
+
"🏙 Attachment...": "🏙 Вложение..."
|
|
79
79
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Cevap",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
|
-
"Also send to channel": "
|
|
6
|
+
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
|
|
8
8
|
"Are you sure?": "",
|
|
9
9
|
"Block User": "Kullanıcıyı engelle",
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"Edit Message": "Mesajı Düzenle",
|
|
19
19
|
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "
|
|
23
|
-
"Error loading channel list...": "",
|
|
21
|
+
"Empty message...": "Boş mesaj...",
|
|
22
|
+
"Error loading": "",
|
|
23
|
+
"Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
|
|
24
24
|
"Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
25
|
+
"Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
|
|
26
26
|
"File type not supported": "",
|
|
27
27
|
"Flag": "Raporla",
|
|
28
28
|
"Flag Message": "Mesajı Raporla",
|
|
29
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?": "",
|
|
30
|
+
"How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
|
|
31
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.": "",
|
|
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
38
|
"Message Reactions": "Mesaj Tepkileri",
|
|
39
39
|
"Message deleted": "Mesaj silindi",
|
|
40
40
|
"Message flagged": "Mesaj işaretlendi",
|
|
41
41
|
"Mute User": "Kullanıcıyı sessize al",
|
|
42
42
|
"Not supported": "",
|
|
43
|
-
"Nothing yet...": "",
|
|
43
|
+
"Nothing yet...": "Henüz değil...",
|
|
44
44
|
"Ok": "Tamam",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
@@ -54,26 +54,26 @@
|
|
|
54
54
|
"Reply": "Yanıtla",
|
|
55
55
|
"Reply to Message": "",
|
|
56
56
|
"Resend": "Yeniden gönder",
|
|
57
|
-
"Search GIFs": "",
|
|
57
|
+
"Search GIFs": "GIF Ara",
|
|
58
58
|
"Select More Photos": "",
|
|
59
59
|
"Send Anyway": "",
|
|
60
|
-
"Send a message": "",
|
|
61
|
-
"Sending links is not allowed in this conversation": "",
|
|
62
|
-
"Slow mode ON": "",
|
|
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
63
|
"The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
|
|
64
64
|
"Thread Reply": "Konu Yanıtı",
|
|
65
65
|
"Unblock User": "Kullanıcının engelini kaldır",
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "Kullanıcının sesini aç",
|
|
68
68
|
"Unpin from Conversation": "Sabitlemeyi kaldır",
|
|
69
|
-
"Unread Messages": "",
|
|
69
|
+
"Unread Messages": "Okunmamış Mesajlar",
|
|
70
70
|
"Video": "Video",
|
|
71
|
-
"You": "",
|
|
71
|
+
"You": "Sen",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
-
"{{ replyCount }} Replies": "",
|
|
75
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Cevap",
|
|
76
76
|
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} yazıyor",
|
|
78
|
-
"🏙 Attachment...": ""
|
|
78
|
+
"🏙 Attachment...": "🏙 Ek..."
|
|
79
79
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DefaultStreamChatGenerics } from 'src/types/types';
|
|
2
|
+
import type { Channel } from 'stream-chat';
|
|
3
|
+
export declare const upsertChannelDataFromChannel: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, flush, }: {
|
|
4
|
+
channel: Channel<StreamChatGenerics>;
|
|
5
|
+
flush?: boolean | undefined;
|
|
6
|
+
}) => import("../types").PreparedQueries[] | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Channel } from 'stream-chat';
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
|
+
import type { TableRow } from '../types';
|
|
4
|
+
export declare const mapChannelToStorable: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>) => TableRow<'channels'> | undefined;
|
|
@@ -26,7 +26,7 @@ export declare class DBSyncManager {
|
|
|
26
26
|
static onSyncStatusChange: (listener: (status: boolean) => void) => {
|
|
27
27
|
unsubscribe: () => void;
|
|
28
28
|
};
|
|
29
|
-
static sync: () => Promise<void>;
|
|
29
|
+
static sync: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(client: StreamChat<StreamChatGenerics>) => Promise<void>;
|
|
30
30
|
static syncAndExecutePendingTasks: () => Promise<void>;
|
|
31
31
|
static queueTask: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, task, }: {
|
|
32
32
|
client: StreamChat<StreamChatGenerics>;
|
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.27.0-beta.
|
|
4
|
+
"version": "5.27.0-beta.12",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -292,7 +292,7 @@ export const AttachmentPicker = React.forwardRef(
|
|
|
292
292
|
* this is an issue if you are calling close on the bottom sheet.
|
|
293
293
|
*/
|
|
294
294
|
const snapPoints = useMemo(
|
|
295
|
-
() => [initialSnapPoint, finalSnapPoint],
|
|
295
|
+
() => [Math.max(0, initialSnapPoint), Math.max(0, finalSnapPoint)],
|
|
296
296
|
[initialSnapPoint, finalSnapPoint],
|
|
297
297
|
);
|
|
298
298
|
|
|
@@ -1,74 +1,152 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DefaultStreamChatGenerics } from 'src/types/types';
|
|
2
|
+
import type { Event, StreamChat } from 'stream-chat';
|
|
2
3
|
|
|
3
4
|
import { deleteChannel } from '../../../store/apis/deleteChannel';
|
|
4
5
|
import { deleteMember } from '../../../store/apis/deleteMember';
|
|
5
6
|
import { deleteMessagesForChannel } from '../../../store/apis/deleteMessagesForChannel';
|
|
6
7
|
import { updateMessage } from '../../../store/apis/updateMessage';
|
|
7
8
|
import { upsertChannelData } from '../../../store/apis/upsertChannelData';
|
|
9
|
+
import { upsertChannelDataFromChannel } from '../../../store/apis/upsertChannelDataFromChannel';
|
|
8
10
|
import { upsertChannels } from '../../../store/apis/upsertChannels';
|
|
9
11
|
import { upsertMembers } from '../../../store/apis/upsertMembers';
|
|
10
12
|
import { upsertMessages } from '../../../store/apis/upsertMessages';
|
|
11
13
|
import { upsertReads } from '../../../store/apis/upsertReads';
|
|
14
|
+
import { QuickSqliteClient } from '../../../store/QuickSqliteClient';
|
|
15
|
+
import { createSelectQuery } from '../../../store/sqlite-utils/createSelectQuery';
|
|
16
|
+
import { PreparedQueries } from '../../../store/types';
|
|
12
17
|
|
|
13
|
-
export const handleEventToSyncDB =
|
|
18
|
+
export const handleEventToSyncDB = <
|
|
19
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
20
|
+
>(
|
|
21
|
+
event: Event,
|
|
22
|
+
client: StreamChat<StreamChatGenerics>,
|
|
23
|
+
flush?: boolean,
|
|
24
|
+
) => {
|
|
14
25
|
const { type } = event;
|
|
15
26
|
|
|
27
|
+
// This function is used to guard the queries that require channel to be present in the db first
|
|
28
|
+
// If channel is not present in the db, we first fetch the channel data from the channel object
|
|
29
|
+
// and then add the queries with a channel create query first
|
|
30
|
+
const queriesWithChannelGuard = (
|
|
31
|
+
createQueries: (flushOverride?: boolean) => PreparedQueries[],
|
|
32
|
+
) => {
|
|
33
|
+
const cid = event.cid || event.channel?.cid;
|
|
34
|
+
|
|
35
|
+
if (!cid) return createQueries(flush);
|
|
36
|
+
const channels = QuickSqliteClient.executeSql.apply(
|
|
37
|
+
null,
|
|
38
|
+
createSelectQuery('channels', ['cid'], {
|
|
39
|
+
cid,
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
// a channel is not present in the db, we first fetch the channel data from the channel object.
|
|
43
|
+
// this can happen for example when a message.new event is received for a channel that is not in the db due to a channel being hidden.
|
|
44
|
+
if (channels.length === 0) {
|
|
45
|
+
const channel =
|
|
46
|
+
event.channel_type && event.channel_id
|
|
47
|
+
? client.channel(event.channel_type, event.channel_id)
|
|
48
|
+
: undefined;
|
|
49
|
+
if (channel && channel.initialized && !channel.disconnected) {
|
|
50
|
+
const channelQuery = upsertChannelDataFromChannel({
|
|
51
|
+
channel,
|
|
52
|
+
flush,
|
|
53
|
+
});
|
|
54
|
+
if (channelQuery) {
|
|
55
|
+
const newQueries = [...channelQuery, ...createQueries(false)];
|
|
56
|
+
if (flush !== false) {
|
|
57
|
+
QuickSqliteClient.executeSqlBatch(newQueries);
|
|
58
|
+
}
|
|
59
|
+
return newQueries;
|
|
60
|
+
} else {
|
|
61
|
+
console.warn(
|
|
62
|
+
`Couldnt create channel queries on ${type} event for an initialized channel that is not in DB, skipping event`,
|
|
63
|
+
{ event },
|
|
64
|
+
);
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
console.warn(
|
|
69
|
+
`Received ${type} event for a non initialized channel that is not in DB, skipping event`,
|
|
70
|
+
{ event },
|
|
71
|
+
);
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return createQueries(flush);
|
|
76
|
+
};
|
|
77
|
+
|
|
16
78
|
if (type === 'message.read') {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
79
|
+
const cid = event.cid;
|
|
80
|
+
const user = event.user;
|
|
81
|
+
if (user?.id && cid) {
|
|
82
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
83
|
+
upsertReads({
|
|
84
|
+
cid,
|
|
85
|
+
flush: flushOverride,
|
|
86
|
+
reads: [
|
|
87
|
+
{
|
|
88
|
+
last_read: event.received_at as string,
|
|
89
|
+
unread_messages: 0,
|
|
90
|
+
user,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
29
95
|
}
|
|
30
96
|
}
|
|
31
97
|
|
|
32
98
|
if (type === 'message.new') {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
99
|
+
const message = event.message;
|
|
100
|
+
if (message && (!message.parent_id || message.show_in_channel)) {
|
|
101
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
102
|
+
upsertMessages({
|
|
103
|
+
flush: flushOverride,
|
|
104
|
+
messages: [message],
|
|
105
|
+
}),
|
|
106
|
+
);
|
|
38
107
|
}
|
|
39
108
|
}
|
|
40
109
|
|
|
41
110
|
if (type === 'message.updated' || type === 'message.deleted') {
|
|
42
|
-
|
|
111
|
+
const message = event.message;
|
|
112
|
+
if (message && !message.parent_id) {
|
|
43
113
|
// Update only if it exists, otherwise event could be related
|
|
44
114
|
// to a message which is not in database.
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
115
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
116
|
+
updateMessage({
|
|
117
|
+
flush: flushOverride,
|
|
118
|
+
message,
|
|
119
|
+
}),
|
|
120
|
+
);
|
|
49
121
|
}
|
|
50
122
|
}
|
|
51
123
|
|
|
52
124
|
if (type === 'reaction.updated') {
|
|
53
|
-
|
|
125
|
+
const message = event.message;
|
|
126
|
+
if (message && event.reaction) {
|
|
54
127
|
// We update the entire message to make sure we also update
|
|
55
128
|
// reaction_counts.
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
129
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
130
|
+
updateMessage({
|
|
131
|
+
flush: flushOverride,
|
|
132
|
+
message,
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
60
135
|
}
|
|
61
136
|
}
|
|
62
137
|
|
|
63
138
|
if (type === 'reaction.new' || type === 'reaction.deleted') {
|
|
64
|
-
|
|
139
|
+
const message = event.message;
|
|
140
|
+
if (message && !message.parent_id) {
|
|
65
141
|
// Here we are relying on the fact message.latest_reactions always includes
|
|
66
142
|
// the new reaction. So we first delete all the existing reactions and populate
|
|
67
143
|
// the reactions table with message.latest_reactions
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
144
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
145
|
+
updateMessage({
|
|
146
|
+
flush: flushOverride,
|
|
147
|
+
message,
|
|
148
|
+
}),
|
|
149
|
+
);
|
|
72
150
|
}
|
|
73
151
|
}
|
|
74
152
|
|
|
@@ -119,22 +197,30 @@ export const handleEventToSyncDB = (event: Event, flush?: boolean) => {
|
|
|
119
197
|
}
|
|
120
198
|
|
|
121
199
|
if (type === 'member.added' || type === 'member.updated') {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
200
|
+
const member = event.member;
|
|
201
|
+
const cid = event.cid;
|
|
202
|
+
if (member && cid) {
|
|
203
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
204
|
+
upsertMembers({
|
|
205
|
+
cid,
|
|
206
|
+
flush: flushOverride,
|
|
207
|
+
members: [member],
|
|
208
|
+
}),
|
|
209
|
+
);
|
|
128
210
|
}
|
|
129
211
|
}
|
|
130
212
|
|
|
131
213
|
if (type === 'member.removed') {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
214
|
+
const member = event.member;
|
|
215
|
+
const cid = event.cid;
|
|
216
|
+
if (member && cid) {
|
|
217
|
+
return queriesWithChannelGuard((flushOverride) =>
|
|
218
|
+
deleteMember({
|
|
219
|
+
cid,
|
|
220
|
+
flush: flushOverride,
|
|
221
|
+
member,
|
|
222
|
+
}),
|
|
223
|
+
);
|
|
138
224
|
}
|
|
139
225
|
}
|
|
140
226
|
|
|
@@ -22,7 +22,7 @@ export const useSyncDatabase = <
|
|
|
22
22
|
let listener: ReturnType<StreamChat['on']> | undefined;
|
|
23
23
|
|
|
24
24
|
if (enableOfflineSupport && initialisedDatabase) {
|
|
25
|
-
listener = client?.on(handleEventToSyncDB);
|
|
25
|
+
listener = client?.on((event) => handleEventToSyncDB(event, client));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return () => {
|
|
@@ -26,7 +26,7 @@ import Animated, {
|
|
|
26
26
|
withTiming,
|
|
27
27
|
} from 'react-native-reanimated';
|
|
28
28
|
|
|
29
|
-
import { BottomSheetModal, BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
29
|
+
import { BottomSheetModal, BottomSheetModalProvider, BottomSheetProps } from '@gorhom/bottom-sheet';
|
|
30
30
|
|
|
31
31
|
import type { UserResponse } from 'stream-chat';
|
|
32
32
|
|
|
@@ -132,6 +132,29 @@ type Props<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamC
|
|
|
132
132
|
| 'autoPlayVideo'
|
|
133
133
|
>;
|
|
134
134
|
|
|
135
|
+
type SnapPoints = BottomSheetProps['snapPoints'];
|
|
136
|
+
|
|
137
|
+
const normalizeSnapPoints = (input: SnapPoints): SnapPoints => {
|
|
138
|
+
const snapPoints = input ? ('value' in input ? input.value : input) : [];
|
|
139
|
+
|
|
140
|
+
return snapPoints.map((snapPoint) => {
|
|
141
|
+
if (typeof snapPoint === 'number') {
|
|
142
|
+
return Math.max(0, snapPoint);
|
|
143
|
+
} else {
|
|
144
|
+
const numericValue = Number(snapPoint.replace('%', ''));
|
|
145
|
+
const isPercentage = snapPoint.includes('%');
|
|
146
|
+
|
|
147
|
+
if (isNaN(numericValue)) {
|
|
148
|
+
return 0;
|
|
149
|
+
} else if (isPercentage) {
|
|
150
|
+
return `${Math.max(0, numericValue)}%`;
|
|
151
|
+
} else {
|
|
152
|
+
return Math.max(0, numericValue);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
|
|
135
158
|
export const ImageGallery = <
|
|
136
159
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
137
160
|
>(
|
|
@@ -685,7 +708,7 @@ export const ImageGallery = <
|
|
|
685
708
|
index={0}
|
|
686
709
|
onChange={(index: number) => setCurrentBottomSheetIndex(index)}
|
|
687
710
|
ref={bottomSheetModalRef}
|
|
688
|
-
snapPoints={imageGalleryGridSnapPoints || snapPoints}
|
|
711
|
+
snapPoints={normalizeSnapPoints(imageGalleryGridSnapPoints || snapPoints)}
|
|
689
712
|
>
|
|
690
713
|
<ImageGrid
|
|
691
714
|
closeGridView={closeGridView}
|