stream-chat-react-native-core 5.0.0-offline-support.4 → 5.0.0-offline-support.7
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/Attachment/Gallery.js +85 -56
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +29 -29
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +10 -10
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +7 -7
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/handleEventToSyncDB.js +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +7 -3
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +130 -70
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +1 -1
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/{components/Attachment/hooks → hooks}/useLoadingImage.js +10 -0
- package/lib/commonjs/hooks/useLoadingImage.js.map +1 -0
- package/lib/commonjs/i18n/en.json +2 -1
- package/lib/commonjs/i18n/fr.json +2 -1
- package/lib/commonjs/i18n/he.json +2 -0
- package/lib/commonjs/i18n/hi.json +2 -1
- package/lib/commonjs/i18n/it.json +2 -1
- package/lib/commonjs/i18n/ja.json +2 -0
- package/lib/commonjs/i18n/ko.json +2 -0
- package/lib/commonjs/i18n/nl.json +2 -1
- package/lib/commonjs/i18n/ru.json +2 -1
- package/lib/commonjs/i18n/tr.json +2 -1
- package/lib/commonjs/store/mappers/mapStorableToChannel.js +1 -1
- package/lib/commonjs/store/mappers/mapStorableToChannel.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Gallery.js +85 -56
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +29 -29
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +10 -10
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +7 -7
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/handleEventToSyncDB.js +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +7 -3
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +130 -70
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +1 -1
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/{components/Attachment/hooks → hooks}/useLoadingImage.js +10 -0
- package/lib/module/hooks/useLoadingImage.js.map +1 -0
- package/lib/module/i18n/en.json +2 -1
- package/lib/module/i18n/fr.json +2 -1
- package/lib/module/i18n/he.json +2 -0
- package/lib/module/i18n/hi.json +2 -1
- package/lib/module/i18n/it.json +2 -1
- package/lib/module/i18n/ja.json +2 -0
- package/lib/module/i18n/ko.json +2 -0
- package/lib/module/i18n/nl.json +2 -1
- package/lib/module/i18n/ru.json +2 -1
- package/lib/module/i18n/tr.json +2 -1
- package/lib/module/store/mappers/mapStorableToChannel.js +1 -1
- package/lib/module/store/mappers/mapStorableToChannel.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/{components/Attachment/hooks → hooks}/useLoadingImage.d.ts +0 -0
- package/lib/typescript/i18n/en.json +2 -1
- package/lib/typescript/i18n/fr.json +2 -1
- package/lib/typescript/i18n/he.json +2 -0
- package/lib/typescript/i18n/hi.json +2 -1
- package/lib/typescript/i18n/it.json +2 -1
- package/lib/typescript/i18n/ja.json +2 -0
- package/lib/typescript/i18n/ko.json +2 -0
- package/lib/typescript/i18n/nl.json +2 -1
- package/lib/typescript/i18n/ru.json +2 -1
- package/lib/typescript/i18n/tr.json +2 -1
- package/lib/typescript/utils/Streami18n.d.ts +2 -1
- package/package.json +3 -3
- package/src/components/Attachment/Gallery.tsx +68 -25
- package/src/components/Attachment/Giphy.tsx +1 -2
- package/src/components/Avatar/Avatar.tsx +4 -5
- package/src/components/Avatar/GroupAvatar.tsx +15 -16
- package/src/components/ChannelList/hooks/listeners/handleEventToSyncDB.ts +1 -1
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +3 -3
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -1
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +12 -16
- package/src/components/MessageList/MessageList.tsx +8 -10
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +42 -45
- package/src/components/Reply/Reply.tsx +1 -1
- package/src/hooks/useLoadingImage.tsx +16 -0
- package/src/i18n/en.json +2 -1
- package/src/i18n/fr.json +2 -1
- package/src/i18n/he.json +2 -0
- package/src/i18n/hi.json +2 -1
- package/src/i18n/it.json +2 -1
- package/src/i18n/ja.json +2 -0
- package/src/i18n/ko.json +2 -0
- package/src/i18n/nl.json +2 -1
- package/src/i18n/ru.json +2 -1
- package/src/i18n/tr.json +2 -1
- package/src/store/mappers/mapStorableToChannel.ts +1 -1
- package/src/version.json +1 -1
- package/lib/commonjs/components/Attachment/hooks/useLoadingImage.js.map +0 -1
- package/lib/commonjs/hooks/useImageErrorHandler.js +0 -35
- package/lib/commonjs/hooks/useImageErrorHandler.js.map +0 -1
- package/lib/module/components/Attachment/hooks/useLoadingImage.js.map +0 -1
- package/lib/module/hooks/useImageErrorHandler.js +0 -35
- package/lib/module/hooks/useImageErrorHandler.js.map +0 -1
- package/lib/typescript/hooks/useImageErrorHandler.d.ts +0 -5
- package/src/components/Attachment/hooks/useLoadingImage.tsx +0 -8
- package/src/hooks/useImageErrorHandler.ts +0 -16
package/lib/module/i18n/ja.json
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"Ok": "確認",
|
|
30
30
|
"Photo": "写真",
|
|
31
31
|
"Photos": "写真",
|
|
32
|
+
"Photos and Videos": "写真と動画",
|
|
32
33
|
"Pin to Conversation": "会話にピンする",
|
|
33
34
|
"Please enable access to your photos and videos so you can share them.": "写真やビデオへのアクセスを有効にして、共有できるようにしてください。",
|
|
34
35
|
"Please select a channel first": "最初にチャンネルを選択してください",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"Unmute User": "ユーザーのミュートを解除する",
|
|
47
48
|
"Unpin from Conversation": "会話のピンを外す",
|
|
48
49
|
"Unread Messages": "未読メッセージ",
|
|
50
|
+
"Video": "ビデオ",
|
|
49
51
|
"You": "あなた",
|
|
50
52
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }}と{{ nonSelfUserLength }}人がタイピングしています",
|
|
51
53
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
package/lib/module/i18n/ko.json
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"Ok": "확인",
|
|
30
30
|
"Photo": "사진",
|
|
31
31
|
"Photos": "사진",
|
|
32
|
+
"Photos and Videos": "사진과 동영상",
|
|
32
33
|
"Pin to Conversation": "대화에 고정합니다",
|
|
33
34
|
"Please enable access to your photos and videos so you can share them.": "사진 및 비디오에 대한 액세스를 사용하여 공유 할 수 있도록합니다.",
|
|
34
35
|
"Please select a channel first": "먼저 채널을 선택하십시오",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"Unmute User": "사용자 음소거 해제",
|
|
47
48
|
"Unpin from Conversation": "대화의 핀을 분리합니다",
|
|
48
49
|
"Unread Messages": "읽지 않은 메시지",
|
|
50
|
+
"Video": "동영상",
|
|
49
51
|
"You": "당신",
|
|
50
52
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} 외 {{ nonSelfUserLength }}명이 입력 중입니다",
|
|
51
53
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
package/lib/module/i18n/nl.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Oké",
|
|
38
38
|
"Only visible to you": "Alleen zichtbaar voor jou",
|
|
39
39
|
"Photo": "Foto",
|
|
40
|
-
"Photos": "Foto's",
|
|
40
|
+
"Photos and Videos": "Foto's en video's",
|
|
41
41
|
"Pin to Conversation": "Vastmaken aan gesprek",
|
|
42
42
|
"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.",
|
|
43
43
|
"Please select a channel first": "Selecteer eerst een kanaal",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Dempen van gebruiker opheffen",
|
|
57
57
|
"Unpin from Conversation": "Losmaken van gesprek",
|
|
58
58
|
"Unread Messages": "Ongelezen Berichten",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "U",
|
|
60
61
|
"You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
|
package/lib/module/i18n/ru.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Oк",
|
|
38
38
|
"Only visible to you": "Видно только вам",
|
|
39
39
|
"Photo": "Фото",
|
|
40
|
-
"Photos": "Фото",
|
|
40
|
+
"Photos and Videos": "Фото и видео",
|
|
41
41
|
"Pin to Conversation": "Закрепить к беседе",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
|
|
43
43
|
"Please select a channel first": "Пожалуйста, сначала выберите канал",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Включить микрофон",
|
|
57
57
|
"Unpin from Conversation": "Открепить от беседы",
|
|
58
58
|
"Unread Messages": "Непрочитанные Сообщения",
|
|
59
|
+
"Video": "видео",
|
|
59
60
|
"You": "Вы",
|
|
60
61
|
"You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
|
package/lib/module/i18n/tr.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Tamam",
|
|
38
38
|
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
39
39
|
"Photo": "Fotoğraf",
|
|
40
|
-
"Photos": "Fotoğraflar",
|
|
40
|
+
"Photos and Videos": "Fotoğraflar ve Videolar",
|
|
41
41
|
"Pin to Conversation": "Konuşmaya sabitle",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Lütfen paylaşabilmek için fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
|
|
43
43
|
"Please select a channel first": "Lütfen önce bir kanal seçin",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Kullanıcının sesini aç",
|
|
57
57
|
"Unpin from Conversation": "Sabitlenmeyi kaldır",
|
|
58
58
|
"Unread Messages": "Okunmamış Mesajlar",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "Sen",
|
|
60
61
|
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
@@ -48,7 +48,7 @@ var mapStorableToChannel = function mapStorableToChannel(channelRow) {
|
|
|
48
48
|
id: id,
|
|
49
49
|
invites: invites && JSON.parse(invites),
|
|
50
50
|
last_message_at: lastMessageAt,
|
|
51
|
-
|
|
51
|
+
member_count: memberCount,
|
|
52
52
|
muted: muted,
|
|
53
53
|
own_capabilities: ownCapabilities && JSON.parse(ownCapabilities),
|
|
54
54
|
team: team,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["mapStorableToChannel.ts"],"names":["mapStorableToChannel","channelRow","autoTranslationEnabled","autoTranslationLanguage","cid","config","cooldown","createdAt","createdById","deletedAt","disabled","extraData","frozen","hidden","id","invites","lastMessageAt","memberCount","muted","ownCapabilities","team","truncatedAt","truncatedBy","truncatedById","type","updatedAt","channel","auto_translation_enabled","auto_translation_language","JSON","parse","created_at","created_by_id","deleted_at","last_message_at","own_capabilities","truncated_at","truncated_by","truncated_by_id","updated_at"],"mappings":";;;;;;;;;AAKO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAGlCC,UAHkC,EAO/B;AACH,MACEC,sBADF,GAyBID,UAzBJ,CACEC,sBADF;AAAA,MAEEC,uBAFF,GAyBIF,UAzBJ,CAEEE,uBAFF;AAAA,MAGEC,GAHF,GAyBIH,UAzBJ,CAGEG,GAHF;AAAA,MAIEC,MAJF,GAyBIJ,UAzBJ,CAIEI,MAJF;AAAA,MAKEC,QALF,GAyBIL,UAzBJ,CAKEK,QALF;AAAA,MAMEC,SANF,GAyBIN,UAzBJ,CAMEM,SANF;AAAA,MAOEC,WAPF,GAyBIP,UAzBJ,CAOEO,WAPF;AAAA,MAQEC,SARF,GAyBIR,UAzBJ,CAQEQ,SARF;AAAA,MASEC,QATF,GAyBIT,UAzBJ,CASES,QATF;AAAA,MAUEC,SAVF,GAyBIV,UAzBJ,CAUEU,SAVF;AAAA,MAWEC,MAXF,GAyBIX,UAzBJ,CAWEW,MAXF;AAAA,MAYEC,MAZF,GAyBIZ,UAzBJ,CAYEY,MAZF;AAAA,MAaEC,EAbF,GAyBIb,UAzBJ,CAaEa,EAbF;AAAA,MAcEC,OAdF,GAyBId,UAzBJ,CAcEc,OAdF;AAAA,MAeEC,aAfF,GAyBIf,UAzBJ,CAeEe,aAfF;AAAA,MAgBEC,WAhBF,GAyBIhB,UAzBJ,CAgBEgB,WAhBF;AAAA,MAiBEC,KAjBF,GAyBIjB,UAzBJ,CAiBEiB,KAjBF;AAAA,MAkBEC,eAlBF,GAyBIlB,UAzBJ,CAkBEkB,eAlBF;AAAA,MAmBEC,IAnBF,GAyBInB,UAzBJ,CAmBEmB,IAnBF;AAAA,MAoBEC,WApBF,GAyBIpB,UAzBJ,CAoBEoB,WApBF;AAAA,MAqBEC,WArBF,GAyBIrB,UAzBJ,CAqBEqB,WArBF;AAAA,MAsBEC,aAtBF,GAyBItB,UAzBJ,CAsBEsB,aAtBF;AAAA,MAuBEC,IAvBF,GAyBIvB,UAzBJ,CAuBEuB,IAvBF;AAAA,MAwBEC,SAxBF,GAyBIxB,UAzBJ,CAwBEwB,SAxBF;AA2BA,SAAO;AACLC,IAAAA,OAAO;AACLC,MAAAA,wBAAwB,EAAEzB,sBADrB;AAEL0B,MAAAA,yBAAyB,EAAEzB,uBAFtB;AAGLC,MAAAA,GAAG,EAAHA,GAHK;AAILC,MAAAA,MAAM,EAAEA,MAAM,IAAIwB,IAAI,CAACC,KAAL,CAAWzB,MAAX,CAJb;AAKLC,MAAAA,QAAQ,EAARA,QALK;AAMLyB,MAAAA,UAAU,EAAExB,SANP;AAOLyB,MAAAA,aAAa,EAAExB,WAPV;AAQLyB,MAAAA,UAAU,EAAExB,SARP;AASLC,MAAAA,QAAQ,EAARA,QATK;AAULE,MAAAA,MAAM,EAANA,MAVK;AAWLC,MAAAA,MAAM,EAANA,MAXK;AAYLC,MAAAA,EAAE,EAAFA,EAZK;AAaLC,MAAAA,OAAO,EAAEA,OAAO,IAAIc,IAAI,CAACC,KAAL,CAAWf,OAAX,CAbf;AAcLmB,MAAAA,eAAe,EAAElB,aAdZ;
|
|
1
|
+
{"version":3,"sources":["mapStorableToChannel.ts"],"names":["mapStorableToChannel","channelRow","autoTranslationEnabled","autoTranslationLanguage","cid","config","cooldown","createdAt","createdById","deletedAt","disabled","extraData","frozen","hidden","id","invites","lastMessageAt","memberCount","muted","ownCapabilities","team","truncatedAt","truncatedBy","truncatedById","type","updatedAt","channel","auto_translation_enabled","auto_translation_language","JSON","parse","created_at","created_by_id","deleted_at","last_message_at","member_count","own_capabilities","truncated_at","truncated_by","truncated_by_id","updated_at"],"mappings":"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","sourcesContent":["import type { ChannelAPIResponse } from 'stream-chat';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport type { TableRow } from '../types';\n\nexport const mapStorableToChannel = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n channelRow: TableRow<'channels'>,\n): Omit<\n ChannelAPIResponse<StreamChatGenerics>,\n 'duration' | 'messages' | 'members' | 'pinned_messages'\n> => {\n const {\n autoTranslationEnabled,\n autoTranslationLanguage,\n cid,\n config,\n cooldown,\n createdAt,\n createdById,\n deletedAt,\n disabled,\n extraData,\n frozen,\n hidden,\n id,\n invites,\n lastMessageAt,\n memberCount,\n muted,\n ownCapabilities,\n team,\n truncatedAt,\n truncatedBy,\n truncatedById,\n type,\n updatedAt,\n } = channelRow;\n\n return {\n channel: {\n auto_translation_enabled: autoTranslationEnabled,\n auto_translation_language: autoTranslationLanguage,\n cid,\n config: config && JSON.parse(config),\n cooldown,\n created_at: createdAt,\n created_by_id: createdById,\n deleted_at: deletedAt,\n disabled,\n frozen,\n hidden,\n id,\n invites: invites && JSON.parse(invites),\n last_message_at: lastMessageAt,\n member_count: memberCount,\n muted,\n own_capabilities: ownCapabilities && JSON.parse(ownCapabilities),\n team,\n truncated_at: truncatedAt,\n truncated_by: truncatedBy,\n truncated_by_id: truncatedById,\n type,\n updated_at: updatedAt,\n ...(extraData ? JSON.parse(extraData) : {}),\n },\n };\n};\n"]}
|
package/lib/module/version.json
CHANGED
|
File without changes
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Ok",
|
|
38
38
|
"Only visible to you": "Only visible to you",
|
|
39
39
|
"Photo": "Photo",
|
|
40
|
-
"Photos": "Photos",
|
|
40
|
+
"Photos and Videos": "Photos and Videos",
|
|
41
41
|
"Pin to Conversation": "Pin to Conversation",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Please enable access to your photos and videos so you can share them.",
|
|
43
43
|
"Please select a channel first": "Please select a channel first",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Unmute User",
|
|
57
57
|
"Unpin from Conversation": "Unpin from Conversation",
|
|
58
58
|
"Unread Messages": "Unread Messages",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "You",
|
|
60
61
|
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} and {{ nonSelfUserLength }} more are typing",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Ok",
|
|
38
38
|
"Only visible to you": "Seulement visible par vous",
|
|
39
39
|
"Photo": "Photo",
|
|
40
|
-
"Photos": "Photos",
|
|
40
|
+
"Photos and Videos": "Photos et vidéos",
|
|
41
41
|
"Pin to Conversation": "Épingler à la conversation",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Veuillez autoriser l'accès à vos photos et vidéos afin de pouvoir les partager.",
|
|
43
43
|
"Please select a channel first": "Veuillez d'abord selectionnez un canal",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Activer le son de Utilisateur",
|
|
57
57
|
"Unpin from Conversation": "Décrocher de la conversation",
|
|
58
58
|
"Unread Messages": "Messages non lus",
|
|
59
|
+
"Video": "Vidéo",
|
|
59
60
|
"You": "Toi",
|
|
60
61
|
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} et {{ nonSelfUserLength }} autres sont en train d'écrire",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"Only visible to you": "גלוי רק לך",
|
|
39
39
|
"Photo": "תמונה",
|
|
40
40
|
"Photos": "תמונות",
|
|
41
|
+
"Photos and Videos": "תמונות ווידאו",
|
|
41
42
|
"Pin to Conversation": "הצמד/י לשיחה",
|
|
42
43
|
"Please enable access to your photos and videos so you can share them.": "אפשר/י גישה לתמונות ולסרטונים שלך כדי שתוכל/י לשתף אותם.",
|
|
43
44
|
"Please select a channel first": "אנא בחר/י שיחה תחילה",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"Unmute User": "בטל/י השתקת משתמש",
|
|
57
58
|
"Unpin from Conversation": "בטל/י הצמדה לשיחה",
|
|
58
59
|
"Unread Messages": "הודעות שטרם נקרו",
|
|
60
|
+
"Video": "וִידֵאוֹ",
|
|
59
61
|
"You": "את/ה",
|
|
60
62
|
"You can't send messages in this channel": "את/ב לא יכול/ה לשלוח הודעות בשיחה זו",
|
|
61
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ו-{{ nonSelfUserLength }} משתמש/ים אחר/ים מקלידים",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "ठीक",
|
|
38
38
|
"Only visible to you": "केवल आपको दिखाई दे रहा है",
|
|
39
39
|
"Photo": "तस्वीर",
|
|
40
|
-
"Photos": "तस्वीरें",
|
|
40
|
+
"Photos and Videos": "तस्वीरें और वीडियों",
|
|
41
41
|
"Pin to Conversation": "बातचीत में पिन करें",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "कृपया अपनी फ़ोटो और वीडियो तक पहुंच सक्षम करें ताकि आप उन्हें साझा कर सकें।",
|
|
43
43
|
"Please select a channel first": "कृपया पहले एक चैनल चुनें",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "उपयोगकर्ता को अनम्यूट करें",
|
|
57
57
|
"Unpin from Conversation": "बातचीत से अनपिन करें",
|
|
58
58
|
"Unread Messages": "अपठित संदेश",
|
|
59
|
+
"Video": "वीडियो",
|
|
59
60
|
"You": "आप",
|
|
60
61
|
"You can't send messages in this channel": "आप इस चैनल में संदेश नहीं भेज सकते",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} और {{ nonSelfUserLength }} अधिक टाइप कर रहे हैं",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Ok",
|
|
38
38
|
"Only visible to you": "Visibile solo a te",
|
|
39
39
|
"Photo": "Foto",
|
|
40
|
-
"Photos": "
|
|
40
|
+
"Photos and Videos": "Foto e Video",
|
|
41
41
|
"Pin to Conversation": "Metti in evidenza",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Abilita l'accesso alle tue foto e ai tuoi video in modo da poterli condividere.",
|
|
43
43
|
"Please select a channel first": "Seleziona un canale",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Riattiva utente",
|
|
57
57
|
"Unpin from Conversation": "Rimuovi dagli elementi in evidenza",
|
|
58
58
|
"Unread Messages": "Messaggi non letti",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "Tu",
|
|
60
61
|
"You can't send messages in this channel": "Non puoi inviare messaggi in questo canale",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e altri {{ nonSelfUserLength }} stanno scrivendo",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"Ok": "確認",
|
|
30
30
|
"Photo": "写真",
|
|
31
31
|
"Photos": "写真",
|
|
32
|
+
"Photos and Videos": "写真と動画",
|
|
32
33
|
"Pin to Conversation": "会話にピンする",
|
|
33
34
|
"Please enable access to your photos and videos so you can share them.": "写真やビデオへのアクセスを有効にして、共有できるようにしてください。",
|
|
34
35
|
"Please select a channel first": "最初にチャンネルを選択してください",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"Unmute User": "ユーザーのミュートを解除する",
|
|
47
48
|
"Unpin from Conversation": "会話のピンを外す",
|
|
48
49
|
"Unread Messages": "未読メッセージ",
|
|
50
|
+
"Video": "ビデオ",
|
|
49
51
|
"You": "あなた",
|
|
50
52
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }}と{{ nonSelfUserLength }}人がタイピングしています",
|
|
51
53
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"Ok": "확인",
|
|
30
30
|
"Photo": "사진",
|
|
31
31
|
"Photos": "사진",
|
|
32
|
+
"Photos and Videos": "사진과 동영상",
|
|
32
33
|
"Pin to Conversation": "대화에 고정합니다",
|
|
33
34
|
"Please enable access to your photos and videos so you can share them.": "사진 및 비디오에 대한 액세스를 사용하여 공유 할 수 있도록합니다.",
|
|
34
35
|
"Please select a channel first": "먼저 채널을 선택하십시오",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"Unmute User": "사용자 음소거 해제",
|
|
47
48
|
"Unpin from Conversation": "대화의 핀을 분리합니다",
|
|
48
49
|
"Unread Messages": "읽지 않은 메시지",
|
|
50
|
+
"Video": "동영상",
|
|
49
51
|
"You": "당신",
|
|
50
52
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} 외 {{ nonSelfUserLength }}명이 입력 중입니다",
|
|
51
53
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Oké",
|
|
38
38
|
"Only visible to you": "Alleen zichtbaar voor jou",
|
|
39
39
|
"Photo": "Foto",
|
|
40
|
-
"Photos": "Foto's",
|
|
40
|
+
"Photos and Videos": "Foto's en video's",
|
|
41
41
|
"Pin to Conversation": "Vastmaken aan gesprek",
|
|
42
42
|
"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.",
|
|
43
43
|
"Please select a channel first": "Selecteer eerst een kanaal",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Dempen van gebruiker opheffen",
|
|
57
57
|
"Unpin from Conversation": "Losmaken van gesprek",
|
|
58
58
|
"Unread Messages": "Ongelezen Berichten",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "U",
|
|
60
61
|
"You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Oк",
|
|
38
38
|
"Only visible to you": "Видно только вам",
|
|
39
39
|
"Photo": "Фото",
|
|
40
|
-
"Photos": "Фото",
|
|
40
|
+
"Photos and Videos": "Фото и видео",
|
|
41
41
|
"Pin to Conversation": "Закрепить к беседе",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
|
|
43
43
|
"Please select a channel first": "Пожалуйста, сначала выберите канал",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Включить микрофон",
|
|
57
57
|
"Unpin from Conversation": "Открепить от беседы",
|
|
58
58
|
"Unread Messages": "Непрочитанные Сообщения",
|
|
59
|
+
"Video": "видео",
|
|
59
60
|
"You": "Вы",
|
|
60
61
|
"You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"Ok": "Tamam",
|
|
38
38
|
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
39
39
|
"Photo": "Fotoğraf",
|
|
40
|
-
"Photos": "Fotoğraflar",
|
|
40
|
+
"Photos and Videos": "Fotoğraflar ve Videolar",
|
|
41
41
|
"Pin to Conversation": "Konuşmaya sabitle",
|
|
42
42
|
"Please enable access to your photos and videos so you can share them.": "Lütfen paylaşabilmek için fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
|
|
43
43
|
"Please select a channel first": "Lütfen önce bir kanal seçin",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"Unmute User": "Kullanıcının sesini aç",
|
|
57
57
|
"Unpin from Conversation": "Sabitlenmeyi kaldır",
|
|
58
58
|
"Unread Messages": "Okunmamış Mesajlar",
|
|
59
|
+
"Video": "Video",
|
|
59
60
|
"You": "Sen",
|
|
60
61
|
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
61
62
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
@@ -150,7 +150,7 @@ export declare class Streami18n {
|
|
|
150
150
|
Ok: string;
|
|
151
151
|
"Only visible to you": string;
|
|
152
152
|
Photo: string;
|
|
153
|
-
Photos: string;
|
|
153
|
+
"Photos and Videos": string;
|
|
154
154
|
"Pin to Conversation": string;
|
|
155
155
|
"Please enable access to your photos and videos so you can share them.": string;
|
|
156
156
|
"Please select a channel first": string;
|
|
@@ -169,6 +169,7 @@ export declare class Streami18n {
|
|
|
169
169
|
"Unmute User": string;
|
|
170
170
|
"Unpin from Conversation": string;
|
|
171
171
|
"Unread Messages": string;
|
|
172
|
+
Video: string;
|
|
172
173
|
You: string;
|
|
173
174
|
"You can't send messages in this channel": string;
|
|
174
175
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": string;
|
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.0.0-offline-support.
|
|
4
|
+
"version": "5.0.0-offline-support.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react-art": "^17.0.2",
|
|
81
81
|
"react-native-markdown-package": "1.8.1",
|
|
82
82
|
"react-native-url-polyfill": "^1.3.0",
|
|
83
|
-
"stream-chat": "7.0.0-offline-support.
|
|
83
|
+
"stream-chat": "7.0.0-offline-support.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"react-native-svg": "^12.1.0"
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"react-native-fs": "2.18.0",
|
|
140
140
|
"react-native-gesture-handler": "2.3.1",
|
|
141
141
|
"react-native-quick-sqlite": "^3.1.5",
|
|
142
|
-
"react-native-reanimated": "2.
|
|
142
|
+
"react-native-reanimated": "2.7.0",
|
|
143
143
|
"react-native-svg": "12.1.1",
|
|
144
144
|
"react-native-typescript-transformer": "1.2.13",
|
|
145
145
|
"react-native-web": "0.15.0",
|
|
@@ -4,7 +4,7 @@ import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
|
4
4
|
import type { Attachment } from 'stream-chat';
|
|
5
5
|
|
|
6
6
|
import { GalleryImage } from './GallaryImage';
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
import { buildGallery } from './utils/buildGallery/buildGallery';
|
|
9
9
|
|
|
10
10
|
import type { Thumbnail } from './utils/buildGallery/types';
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
useOverlayContext,
|
|
31
31
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
32
32
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
33
|
+
import { useLoadingImage } from '../../hooks/useLoadingImage';
|
|
33
34
|
import { isVideoPackageAvailable } from '../../native';
|
|
34
35
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
35
36
|
import { getUrlWithoutParams } from '../../utils/utils';
|
|
@@ -57,6 +58,11 @@ const styles = StyleSheet.create({
|
|
|
57
58
|
padding: 1,
|
|
58
59
|
},
|
|
59
60
|
imageContainerStyle: { alignItems: 'center', flex: 1, justifyContent: 'center' },
|
|
61
|
+
imageLoadingErrorIndicatorStyle: {
|
|
62
|
+
bottom: 4,
|
|
63
|
+
left: 4,
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
},
|
|
60
66
|
imageLoadingIndicatorStyle: {
|
|
61
67
|
alignItems: 'center',
|
|
62
68
|
justifyContent: 'center',
|
|
@@ -317,9 +323,6 @@ const GalleryThumbnail = <
|
|
|
317
323
|
thumbnail,
|
|
318
324
|
VideoThumbnail,
|
|
319
325
|
}: GalleryThumbnailProps<StreamChatGenerics>) => {
|
|
320
|
-
const { isLoadingImage, isLoadingImageError, setLoadingImage, setLoadingImageError } =
|
|
321
|
-
useLoadingImage();
|
|
322
|
-
|
|
323
326
|
const {
|
|
324
327
|
theme: {
|
|
325
328
|
colors: { overlay },
|
|
@@ -409,6 +412,65 @@ const GalleryThumbnail = <
|
|
|
409
412
|
/>
|
|
410
413
|
) : (
|
|
411
414
|
<View style={styles.imageContainerStyle}>
|
|
415
|
+
<GalleryImageThumbnail
|
|
416
|
+
borderRadius={borderRadius}
|
|
417
|
+
ImageLoadingFailedIndicator={ImageLoadingFailedIndicator}
|
|
418
|
+
ImageLoadingIndicator={ImageLoadingIndicator}
|
|
419
|
+
thumbnail={thumbnail}
|
|
420
|
+
/>
|
|
421
|
+
</View>
|
|
422
|
+
)}
|
|
423
|
+
{colIndex === numOfColumns - 1 && rowIndex === numOfRows - 1 && imagesAndVideos.length > 4 ? (
|
|
424
|
+
<View
|
|
425
|
+
style={[
|
|
426
|
+
StyleSheet.absoluteFillObject,
|
|
427
|
+
styles.moreImagesContainer,
|
|
428
|
+
{ backgroundColor: overlay },
|
|
429
|
+
moreImagesContainer,
|
|
430
|
+
]}
|
|
431
|
+
>
|
|
432
|
+
<Text style={[styles.moreImagesText, moreImagesText]}>
|
|
433
|
+
{`+${imagesAndVideos.length - 4}`}
|
|
434
|
+
</Text>
|
|
435
|
+
</View>
|
|
436
|
+
) : null}
|
|
437
|
+
</TouchableOpacity>
|
|
438
|
+
);
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
const GalleryImageThumbnail = <
|
|
442
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
443
|
+
>({
|
|
444
|
+
borderRadius,
|
|
445
|
+
ImageLoadingFailedIndicator,
|
|
446
|
+
ImageLoadingIndicator,
|
|
447
|
+
thumbnail,
|
|
448
|
+
}: Pick<
|
|
449
|
+
GalleryThumbnailProps<StreamChatGenerics>,
|
|
450
|
+
'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'thumbnail' | 'borderRadius'
|
|
451
|
+
>) => {
|
|
452
|
+
const { isLoadingImage, isLoadingImageError, setLoadingImage, setLoadingImageError } =
|
|
453
|
+
useLoadingImage();
|
|
454
|
+
|
|
455
|
+
const {
|
|
456
|
+
theme: {
|
|
457
|
+
messageSimple: {
|
|
458
|
+
gallery: { image },
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
} = useTheme();
|
|
462
|
+
|
|
463
|
+
return (
|
|
464
|
+
<View
|
|
465
|
+
style={{
|
|
466
|
+
height: thumbnail.height - 1,
|
|
467
|
+
width: thumbnail.width - 1,
|
|
468
|
+
}}
|
|
469
|
+
>
|
|
470
|
+
{isLoadingImageError ? (
|
|
471
|
+
<ImageLoadingFailedIndicator style={[styles.imageLoadingErrorIndicatorStyle]} />
|
|
472
|
+
) : (
|
|
473
|
+
<>
|
|
412
474
|
<MemoizedGalleryImage
|
|
413
475
|
onError={(error) => {
|
|
414
476
|
console.warn(error);
|
|
@@ -433,28 +495,9 @@ const GalleryThumbnail = <
|
|
|
433
495
|
<ImageLoadingIndicator style={styles.imageLoadingIndicatorStyle} />
|
|
434
496
|
</View>
|
|
435
497
|
)}
|
|
436
|
-
|
|
437
|
-
<View style={{ position: 'absolute' }}>
|
|
438
|
-
<ImageLoadingFailedIndicator style={styles.imageLoadingIndicatorStyle} />
|
|
439
|
-
</View>
|
|
440
|
-
)}
|
|
441
|
-
</View>
|
|
498
|
+
</>
|
|
442
499
|
)}
|
|
443
|
-
|
|
444
|
-
<View
|
|
445
|
-
style={[
|
|
446
|
-
StyleSheet.absoluteFillObject,
|
|
447
|
-
styles.moreImagesContainer,
|
|
448
|
-
{ backgroundColor: overlay },
|
|
449
|
-
moreImagesContainer,
|
|
450
|
-
]}
|
|
451
|
-
>
|
|
452
|
-
<Text style={[styles.moreImagesText, moreImagesText]}>
|
|
453
|
-
{`+${imagesAndVideos.length - 4}`}
|
|
454
|
-
</Text>
|
|
455
|
-
</View>
|
|
456
|
-
) : null}
|
|
457
|
-
</TouchableOpacity>
|
|
500
|
+
</View>
|
|
458
501
|
);
|
|
459
502
|
};
|
|
460
503
|
|
|
@@ -3,8 +3,6 @@ import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import type { Attachment } from 'stream-chat';
|
|
5
5
|
|
|
6
|
-
import { useLoadingImage } from './hooks/useLoadingImage';
|
|
7
|
-
|
|
8
6
|
import {
|
|
9
7
|
ImageGalleryContextValue,
|
|
10
8
|
useImageGalleryContext,
|
|
@@ -22,6 +20,7 @@ import {
|
|
|
22
20
|
useOverlayContext,
|
|
23
21
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
24
22
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
23
|
+
import { useLoadingImage } from '../../hooks/useLoadingImage';
|
|
25
24
|
import { GiphyIcon } from '../../icons';
|
|
26
25
|
import { Lightning } from '../../icons/Lightning';
|
|
27
26
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
@@ -3,7 +3,7 @@ import { Image, ImageStyle, StyleProp, StyleSheet, View, ViewStyle } from 'react
|
|
|
3
3
|
import Svg, { Circle, CircleProps } from 'react-native-svg';
|
|
4
4
|
|
|
5
5
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
6
|
-
import {
|
|
6
|
+
import { useLoadingImage } from '../../hooks/useLoadingImage';
|
|
7
7
|
import { getResizedImageUrl } from '../../utils/getResizedImageUrl';
|
|
8
8
|
|
|
9
9
|
const randomImageBaseUrl = 'https://getstream.io/random_png/';
|
|
@@ -69,7 +69,7 @@ export const Avatar: React.FC<AvatarProps> = (props) => {
|
|
|
69
69
|
},
|
|
70
70
|
} = useTheme();
|
|
71
71
|
|
|
72
|
-
const {
|
|
72
|
+
const { isLoadingImageError, setLoadingImageError } = useLoadingImage();
|
|
73
73
|
|
|
74
74
|
return (
|
|
75
75
|
<View>
|
|
@@ -85,7 +85,7 @@ export const Avatar: React.FC<AvatarProps> = (props) => {
|
|
|
85
85
|
containerStyle,
|
|
86
86
|
]}
|
|
87
87
|
>
|
|
88
|
-
{
|
|
88
|
+
{isLoadingImageError ? (
|
|
89
89
|
<View
|
|
90
90
|
style={{
|
|
91
91
|
backgroundColor: '#ececec',
|
|
@@ -97,10 +97,9 @@ export const Avatar: React.FC<AvatarProps> = (props) => {
|
|
|
97
97
|
) : (
|
|
98
98
|
<Image
|
|
99
99
|
accessibilityLabel={testID || 'avatar-image'}
|
|
100
|
-
onError={() =>
|
|
100
|
+
onError={() => setLoadingImageError(true)}
|
|
101
101
|
source={{
|
|
102
102
|
uri:
|
|
103
|
-
imageError ||
|
|
104
103
|
!imageProp ||
|
|
105
104
|
imageProp.includes(randomImageBaseUrl) ||
|
|
106
105
|
imageProp.includes(randomSvgBaseUrl)
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
5
|
-
import {
|
|
5
|
+
import { useLoadingImage } from '../../hooks/useLoadingImage';
|
|
6
6
|
import { getResizedImageUrl } from '../../utils/getResizedImageUrl';
|
|
7
7
|
|
|
8
8
|
const randomImageBaseUrl = 'https://getstream.io/random_png/';
|
|
@@ -45,7 +45,7 @@ export const GroupAvatar: React.FC<GroupAvatarProps> = (props) => {
|
|
|
45
45
|
},
|
|
46
46
|
} = useTheme();
|
|
47
47
|
|
|
48
|
-
const {
|
|
48
|
+
const { isLoadingImageError, setLoadingImageError } = useLoadingImage();
|
|
49
49
|
/**
|
|
50
50
|
* [
|
|
51
51
|
* [
|
|
@@ -115,7 +115,7 @@ export const GroupAvatar: React.FC<GroupAvatarProps> = (props) => {
|
|
|
115
115
|
]}
|
|
116
116
|
testID={testID || 'group-avatar'}
|
|
117
117
|
>
|
|
118
|
-
{
|
|
118
|
+
{isLoadingImageError ? (
|
|
119
119
|
<View
|
|
120
120
|
style={{
|
|
121
121
|
backgroundColor: '#ececec',
|
|
@@ -139,20 +139,19 @@ export const GroupAvatar: React.FC<GroupAvatarProps> = (props) => {
|
|
|
139
139
|
<Image
|
|
140
140
|
accessibilityLabel={testID || 'avatar-image'}
|
|
141
141
|
key={`avatar-${url}-${rowIndex}`}
|
|
142
|
-
onError={() =>
|
|
142
|
+
onError={() => setLoadingImageError(true)}
|
|
143
143
|
source={{
|
|
144
|
-
uri:
|
|
145
|
-
|
|
146
|
-
? url
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}),
|
|
144
|
+
uri: url.includes(randomSvgBaseUrl)
|
|
145
|
+
? url.includes(streamCDN)
|
|
146
|
+
? url
|
|
147
|
+
: `${randomImageBaseUrl}${
|
|
148
|
+
name ? `?name=${getInitials(name)}&size=${height}` : ''
|
|
149
|
+
}`
|
|
150
|
+
: getResizedImageUrl({
|
|
151
|
+
height,
|
|
152
|
+
url,
|
|
153
|
+
width,
|
|
154
|
+
}),
|
|
156
155
|
}}
|
|
157
156
|
style={[
|
|
158
157
|
image,
|
|
@@ -53,7 +53,7 @@ export const handleEventToSyncDB = (event: Event, flush?: boolean) => {
|
|
|
53
53
|
if (event.message && event.reaction) {
|
|
54
54
|
// We update the entire message to make sure we also update
|
|
55
55
|
// reaction_counts.
|
|
56
|
-
updateMessage({
|
|
56
|
+
return updateMessage({
|
|
57
57
|
flush,
|
|
58
58
|
message: event.message,
|
|
59
59
|
});
|