stream-chat-react-native-core 4.11.1-beta.2 → 4.11.1-beta.3

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 (31) hide show
  1. package/lib/commonjs/components/Attachment/VideoThumbnail.js +18 -16
  2. package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -1
  3. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +4 -2
  4. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  5. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +4 -1
  6. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  7. package/lib/commonjs/components/Reply/Reply.js +21 -13
  8. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  9. package/lib/commonjs/contexts/themeContext/utils/theme.js +5 -1
  10. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  11. package/lib/commonjs/version.json +1 -1
  12. package/lib/module/components/Attachment/VideoThumbnail.js +18 -16
  13. package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -1
  14. package/lib/module/components/MessageInput/FileUploadPreview.js +4 -2
  15. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  16. package/lib/module/components/MessageInput/ImageUploadPreview.js +4 -1
  17. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  18. package/lib/module/components/Reply/Reply.js +21 -13
  19. package/lib/module/components/Reply/Reply.js.map +1 -1
  20. package/lib/module/contexts/themeContext/utils/theme.js +5 -1
  21. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  22. package/lib/module/version.json +1 -1
  23. package/lib/typescript/components/Attachment/VideoThumbnail.d.ts +4 -2
  24. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +4 -0
  25. package/package.json +1 -1
  26. package/src/components/Attachment/VideoThumbnail.tsx +14 -4
  27. package/src/components/MessageInput/FileUploadPreview.tsx +3 -3
  28. package/src/components/MessageInput/ImageUploadPreview.tsx +2 -2
  29. package/src/components/Reply/Reply.tsx +14 -2
  30. package/src/contexts/themeContext/utils/theme.ts +8 -0
  31. package/src/version.json +1 -1
@@ -53,13 +53,16 @@ const styles = StyleSheet.create({
53
53
  },
54
54
  text: { fontSize: 12 },
55
55
  textContainer: { maxWidth: undefined, paddingHorizontal: 8 },
56
- videoAttachment: {
56
+ videoThumbnailContainerStyle: {
57
57
  borderRadius: 8,
58
58
  height: 50,
59
59
  marginLeft: 8,
60
60
  marginVertical: 8,
61
61
  width: 50,
62
62
  },
63
+ videoThumbnailImageStyle: {
64
+ borderRadius: 10,
65
+ },
63
66
  });
64
67
 
65
68
  type ReplyPropsWithContext<
@@ -140,6 +143,10 @@ const ReplyWithContext = <
140
143
  markdownStyles,
141
144
  messageContainer,
142
145
  textContainer,
146
+ videoThumbnail: {
147
+ container: videoThumbnailContainerStyle,
148
+ image: videoThumbnailImageStyle,
149
+ },
143
150
  },
144
151
  },
145
152
  } = useTheme();
@@ -153,6 +160,7 @@ const ReplyWithContext = <
153
160
  !error &&
154
161
  lastAttachment &&
155
162
  messageType !== 'file' &&
163
+ messageType !== 'video' &&
156
164
  (lastAttachment.image_url || lastAttachment.thumb_url || lastAttachment.og_scrape_url);
157
165
 
158
166
  const onlyEmojis = !lastAttachment && !!quotedMessage.text && emojiRegex.test(quotedMessage.text);
@@ -207,7 +215,11 @@ const ReplyWithContext = <
207
215
  ) : null
208
216
  ) : null}
209
217
  {messageType === 'video' && !lastAttachment.og_scrape_url ? (
210
- <VideoThumbnail style={[styles.videoAttachment]} />
218
+ <VideoThumbnail
219
+ imageStyle={[styles.videoThumbnailImageStyle, videoThumbnailImageStyle]}
220
+ style={[styles.videoThumbnailContainerStyle, videoThumbnailContainerStyle]}
221
+ thumb_url={lastAttachment.thumb_url}
222
+ />
211
223
  ) : null}
212
224
  <MessageTextContainer<StreamChatGenerics>
213
225
  markdownStyles={
@@ -529,6 +529,10 @@ export type Theme = {
529
529
  markdownStyles: MarkdownStyle;
530
530
  messageContainer: ViewStyle;
531
531
  textContainer: ViewStyle;
532
+ videoThumbnail: {
533
+ container: ViewStyle;
534
+ image: ImageStyle;
535
+ };
532
536
  };
533
537
  screenPadding: number;
534
538
  spinner: ViewStyle;
@@ -1058,6 +1062,10 @@ export const defaultTheme: Theme = {
1058
1062
  markdownStyles: {},
1059
1063
  messageContainer: {},
1060
1064
  textContainer: {},
1065
+ videoThumbnail: {
1066
+ container: {},
1067
+ image: {},
1068
+ },
1061
1069
  },
1062
1070
  screenPadding: 8,
1063
1071
  spinner: {},
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "4.11.1-beta.2"
2
+ "version": "4.11.1-beta.3"
3
3
  }