stream-chat-react-native-core 9.0.0-beta.26 → 9.0.0-beta.28

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 (273) hide show
  1. package/lib/commonjs/components/Attachment/Giphy/Giphy.js +19 -7
  2. package/lib/commonjs/components/Attachment/Giphy/Giphy.js.map +1 -1
  3. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
  4. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
  5. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
  6. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
  7. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
  8. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  9. package/lib/commonjs/components/Channel/Channel.js +1 -1
  10. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  11. package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js +0 -15
  12. package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
  13. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
  14. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  15. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  16. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  17. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +1 -0
  18. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  19. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
  20. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  21. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -4
  22. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  23. package/lib/commonjs/components/Indicators/LoadingIndicator.js +3 -3
  24. package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
  25. package/lib/commonjs/components/Message/Message.js +2 -10
  26. package/lib/commonjs/components/Message/Message.js.map +1 -1
  27. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js +39 -5
  28. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js.map +1 -1
  29. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js +11 -7
  30. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  31. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js +1 -1
  32. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  33. package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js +18 -8
  34. package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js.map +1 -1
  35. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +3 -1
  36. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  37. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
  38. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  39. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +0 -1
  40. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
  41. package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js +8 -0
  42. package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js.map +1 -1
  43. package/lib/commonjs/components/Poll/components/PollInputDialog.js +1 -1
  44. package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
  45. package/lib/commonjs/components/Poll/components/PollOption.js +15 -5
  46. package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
  47. package/lib/commonjs/components/ThreadList/ThreadList.js +3 -1
  48. package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
  49. package/lib/commonjs/components/UIComponents/BottomSheetModal.js +141 -40
  50. package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -1
  51. package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js +53 -0
  52. package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
  53. package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
  54. package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
  55. package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js +1 -1
  56. package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js.map +1 -1
  57. package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js +1 -1
  58. package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
  59. package/lib/commonjs/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
  60. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js +4 -4
  61. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  62. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  63. package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
  64. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  65. package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js +4 -4
  66. package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
  67. package/lib/commonjs/i18n/en.json +3 -2
  68. package/lib/commonjs/i18n/es.json +3 -2
  69. package/lib/commonjs/i18n/fr.json +3 -2
  70. package/lib/commonjs/i18n/he.json +3 -2
  71. package/lib/commonjs/i18n/hi.json +3 -2
  72. package/lib/commonjs/i18n/it.json +3 -2
  73. package/lib/commonjs/i18n/ja.json +3 -2
  74. package/lib/commonjs/i18n/ko.json +3 -2
  75. package/lib/commonjs/i18n/nl.json +3 -2
  76. package/lib/commonjs/i18n/pt-br.json +3 -2
  77. package/lib/commonjs/i18n/ru.json +3 -2
  78. package/lib/commonjs/i18n/tr.json +3 -2
  79. package/lib/commonjs/version.json +1 -1
  80. package/lib/module/components/Attachment/Giphy/Giphy.js +19 -7
  81. package/lib/module/components/Attachment/Giphy/Giphy.js.map +1 -1
  82. package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
  83. package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
  84. package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
  85. package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
  86. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
  87. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  88. package/lib/module/components/Channel/Channel.js +1 -1
  89. package/lib/module/components/Channel/Channel.js.map +1 -1
  90. package/lib/module/components/ChannelList/hooks/useChannelActionItems.js +0 -15
  91. package/lib/module/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
  92. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
  93. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  94. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  95. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  96. package/lib/module/components/ChannelPreview/ChannelPreviewView.js +1 -0
  97. package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  98. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
  99. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  100. package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -4
  101. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  102. package/lib/module/components/Indicators/LoadingIndicator.js +3 -3
  103. package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
  104. package/lib/module/components/Message/Message.js +2 -10
  105. package/lib/module/components/Message/Message.js.map +1 -1
  106. package/lib/module/components/Message/MessageItemView/MessageContent.js +39 -5
  107. package/lib/module/components/Message/MessageItemView/MessageContent.js.map +1 -1
  108. package/lib/module/components/Message/MessageItemView/MessageItemView.js +11 -7
  109. package/lib/module/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  110. package/lib/module/components/Message/MessageItemView/MessageReplies.js +1 -1
  111. package/lib/module/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  112. package/lib/module/components/Message/MessageItemView/MessageStatus.js +18 -8
  113. package/lib/module/components/Message/MessageItemView/MessageStatus.js.map +1 -1
  114. package/lib/module/components/Message/hooks/useCreateMessageContext.js +3 -1
  115. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  116. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
  117. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  118. package/lib/module/components/MessageMenu/MessageUserReactions.js +0 -1
  119. package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
  120. package/lib/module/components/Poll/components/MultipleVotesSettings.js +8 -0
  121. package/lib/module/components/Poll/components/MultipleVotesSettings.js.map +1 -1
  122. package/lib/module/components/Poll/components/PollInputDialog.js +1 -1
  123. package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
  124. package/lib/module/components/Poll/components/PollOption.js +15 -5
  125. package/lib/module/components/Poll/components/PollOption.js.map +1 -1
  126. package/lib/module/components/ThreadList/ThreadList.js +3 -1
  127. package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
  128. package/lib/module/components/UIComponents/BottomSheetModal.js +141 -40
  129. package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -1
  130. package/lib/module/components/UIComponents/BottomSheetModal.utils.js +53 -0
  131. package/lib/module/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
  132. package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
  133. package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
  134. package/lib/module/components/ui/Avatar/ChannelAvatar.js +1 -1
  135. package/lib/module/components/ui/Avatar/ChannelAvatar.js.map +1 -1
  136. package/lib/module/components/ui/Button/hooks/useButtonStyles.js +1 -1
  137. package/lib/module/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
  138. package/lib/module/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
  139. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js +4 -4
  140. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  141. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  142. package/lib/module/contexts/themeContext/utils/theme.js +1 -0
  143. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  144. package/lib/module/hooks/messagePreview/useMessagePreviewText.js +4 -4
  145. package/lib/module/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
  146. package/lib/module/i18n/en.json +3 -2
  147. package/lib/module/i18n/es.json +3 -2
  148. package/lib/module/i18n/fr.json +3 -2
  149. package/lib/module/i18n/he.json +3 -2
  150. package/lib/module/i18n/hi.json +3 -2
  151. package/lib/module/i18n/it.json +3 -2
  152. package/lib/module/i18n/ja.json +3 -2
  153. package/lib/module/i18n/ko.json +3 -2
  154. package/lib/module/i18n/nl.json +3 -2
  155. package/lib/module/i18n/pt-br.json +3 -2
  156. package/lib/module/i18n/ru.json +3 -2
  157. package/lib/module/i18n/tr.json +3 -2
  158. package/lib/module/version.json +1 -1
  159. package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts +1 -1
  160. package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts.map +1 -1
  161. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerGenericContent.d.ts.map +1 -1
  162. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
  163. package/lib/typescript/components/ChannelList/hooks/useChannelActionItems.d.ts.map +1 -1
  164. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts +2 -2
  165. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts.map +1 -1
  166. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
  167. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +1 -1
  168. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
  169. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +2 -2
  170. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
  171. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts +3 -3
  172. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
  173. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts.map +1 -1
  174. package/lib/typescript/components/Indicators/LoadingIndicator.d.ts.map +1 -1
  175. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  176. package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts.map +1 -1
  177. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts +1 -1
  178. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts.map +1 -1
  179. package/lib/typescript/components/Message/MessageItemView/MessageStatus.d.ts.map +1 -1
  180. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
  181. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
  182. package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts.map +1 -1
  183. package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -1
  184. package/lib/typescript/components/Poll/components/MultipleVotesSettings.d.ts.map +1 -1
  185. package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
  186. package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
  187. package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +5 -1
  188. package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -1
  189. package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts +28 -0
  190. package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts.map +1 -0
  191. package/lib/typescript/components/UIComponents/StreamBottomSheetModalFlatList.d.ts.map +1 -1
  192. package/lib/typescript/components/ui/Avatar/ChannelAvatar.d.ts.map +1 -1
  193. package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts +1 -0
  194. package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts.map +1 -1
  195. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -2
  196. package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
  197. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts +1 -0
  198. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts.map +1 -1
  199. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
  200. package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
  201. package/lib/typescript/hooks/messagePreview/useMessagePreviewText.d.ts.map +1 -1
  202. package/lib/typescript/i18n/en.json +3 -2
  203. package/lib/typescript/i18n/es.json +3 -2
  204. package/lib/typescript/i18n/fr.json +3 -2
  205. package/lib/typescript/i18n/he.json +3 -2
  206. package/lib/typescript/i18n/hi.json +3 -2
  207. package/lib/typescript/i18n/it.json +3 -2
  208. package/lib/typescript/i18n/ja.json +3 -2
  209. package/lib/typescript/i18n/ko.json +3 -2
  210. package/lib/typescript/i18n/nl.json +3 -2
  211. package/lib/typescript/i18n/pt-br.json +3 -2
  212. package/lib/typescript/i18n/ru.json +3 -2
  213. package/lib/typescript/i18n/tr.json +3 -2
  214. package/lib/typescript/utils/i18n/Streami18n.d.ts +3 -2
  215. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  216. package/package.json +1 -1
  217. package/src/components/Attachment/Giphy/Giphy.tsx +19 -7
  218. package/src/components/Attachment/__tests__/Giphy.test.js +33 -1
  219. package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx +3 -3
  220. package/src/components/AttachmentPicker/components/AttachmentPickerGenericContent.tsx +23 -13
  221. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +3 -1
  222. package/src/components/Channel/Channel.tsx +1 -1
  223. package/src/components/ChannelList/hooks/__tests__/useChannelActionItems.test.tsx +12 -45
  224. package/src/components/ChannelList/hooks/useChannelActionItems.tsx +1 -19
  225. package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +10 -8
  226. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +3 -1
  227. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +1 -1
  228. package/src/components/ChannelPreview/ChannelPreviewView.tsx +3 -2
  229. package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +8 -7
  230. package/src/components/ChannelPreview/__tests__/ChannelDetailsBottomSheet.test.tsx +1 -1
  231. package/src/components/ChannelPreview/__tests__/ChannelLastMessagePreview.test.tsx +32 -0
  232. package/src/components/ChannelPreview/__tests__/ChannelSwipableWrapper.test.tsx +5 -2
  233. package/src/components/ImageGallery/components/ImageGrid.tsx +3 -1
  234. package/src/components/Indicators/LoadingIndicator.tsx +7 -5
  235. package/src/components/Message/Message.tsx +2 -12
  236. package/src/components/Message/MessageItemView/MessageContent.tsx +44 -7
  237. package/src/components/Message/MessageItemView/MessageItemView.tsx +15 -7
  238. package/src/components/Message/MessageItemView/MessageReplies.tsx +1 -1
  239. package/src/components/Message/MessageItemView/MessageStatus.tsx +16 -5
  240. package/src/components/Message/MessageItemView/__tests__/MessageContent.test.js +72 -1
  241. package/src/components/Message/MessageItemView/__tests__/MessageItemView.test.js +52 -1
  242. package/src/components/Message/hooks/useCreateMessageContext.ts +3 -0
  243. package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +1 -0
  244. package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +1 -1
  245. package/src/components/MessageMenu/MessageUserReactions.tsx +1 -5
  246. package/src/components/Poll/components/MultipleVotesSettings.tsx +8 -0
  247. package/src/components/Poll/components/PollInputDialog.tsx +1 -1
  248. package/src/components/Poll/components/PollOption.tsx +25 -9
  249. package/src/components/ThreadList/ThreadList.tsx +1 -1
  250. package/src/components/UIComponents/BottomSheetModal.tsx +237 -53
  251. package/src/components/UIComponents/BottomSheetModal.utils.ts +82 -0
  252. package/src/components/UIComponents/StreamBottomSheetModalFlatList.tsx +14 -5
  253. package/src/components/UIComponents/__tests__/BottomSheetModal.utils.test.ts +111 -0
  254. package/src/components/ui/Avatar/ChannelAvatar.tsx +5 -1
  255. package/src/components/ui/Button/hooks/useButtonStyles.ts +1 -1
  256. package/src/contexts/bottomSheetContext/BottomSheetContext.tsx +1 -0
  257. package/src/contexts/messageComposerContext/MessageComposerContext.tsx +1 -1
  258. package/src/contexts/messageContext/MessageContext.tsx +4 -2
  259. package/src/contexts/themeContext/utils/theme.ts +2 -0
  260. package/src/hooks/messagePreview/useMessagePreviewText.tsx +5 -6
  261. package/src/i18n/en.json +3 -2
  262. package/src/i18n/es.json +3 -2
  263. package/src/i18n/fr.json +3 -2
  264. package/src/i18n/he.json +3 -2
  265. package/src/i18n/hi.json +3 -2
  266. package/src/i18n/it.json +3 -2
  267. package/src/i18n/ja.json +3 -2
  268. package/src/i18n/ko.json +3 -2
  269. package/src/i18n/nl.json +3 -2
  270. package/src/i18n/pt-br.json +3 -2
  271. package/src/i18n/ru.json +3 -2
  272. package/src/i18n/tr.json +3 -2
  273. package/src/version.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { Pressable, StyleSheet, View } from 'react-native';
3
3
 
4
- import { ChannelPreviewProps } from './ChannelPreview';
4
+ import type { ChannelPreviewProps } from './ChannelPreview';
5
5
  import { ChannelPreviewMessage } from './ChannelPreviewMessage';
6
6
  import { ChannelPreviewMutedStatus } from './ChannelPreviewMutedStatus';
7
7
  import { ChannelPreviewStatus } from './ChannelPreviewStatus';
8
8
  import { ChannelPreviewTitle } from './ChannelPreviewTitle';
9
9
  import { ChannelPreviewUnreadCount } from './ChannelPreviewUnreadCount';
10
10
 
11
- import { LastMessageType } from './hooks/useChannelPreviewData';
11
+ import type { LastMessageType } from './hooks/useChannelPreviewData';
12
12
 
13
13
  import {
14
14
  ChannelsContextValue,
@@ -204,6 +204,7 @@ const useStyles = () => {
204
204
  },
205
205
  contentContainer: { flex: 1, gap: primitives.spacingXxs },
206
206
  upperRow: {
207
+ gap: primitives.spacingMd,
207
208
  alignItems: 'center',
208
209
  flex: 1,
209
210
  flexDirection: 'row',
@@ -1,27 +1,27 @@
1
1
  import React, { PropsWithChildren, useCallback, useMemo, useState } from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
 
4
- import { SharedValue } from 'react-native-reanimated';
4
+ import type { SharedValue } from 'react-native-reanimated';
5
5
 
6
- import { Channel } from 'stream-chat';
6
+ import type { Channel } from 'stream-chat';
7
7
 
8
8
  import { ChannelDetailsBottomSheet as DefaultChannelDetailsBottomSheet } from './ChannelDetailsBottomSheet';
9
9
  import type { ChannelDetailsBottomSheetProps } from './ChannelDetailsBottomSheet';
10
10
  import { useIsChannelMuted } from './hooks/useIsChannelMuted';
11
11
 
12
- import { useTheme } from '../../contexts';
13
12
  import { useSwipeRegistryContext } from '../../contexts/swipeableContext/SwipeRegistryContext';
13
+ import { useTheme } from '../../contexts/themeContext/ThemeContext';
14
14
  import { MenuPointHorizontal, Mute, Sound } from '../../icons';
15
- import { GetChannelActionItems } from '../ChannelList/hooks/useChannelActionItems';
15
+ import type { GetChannelActionItems } from '../ChannelList/hooks/useChannelActionItems';
16
16
  import { useChannelActionItems } from '../ChannelList/hooks/useChannelActionItems';
17
17
  import { useChannelActions } from '../ChannelList/hooks/useChannelActions';
18
+ import { BottomSheetModal } from '../UIComponents/BottomSheetModal';
18
19
  import {
19
- BottomSheetModal,
20
20
  RightActions,
21
21
  SwipableActionItem,
22
22
  SwipableWrapper,
23
23
  SwipableWrapperProps,
24
- } from '../UIComponents';
24
+ } from '../UIComponents/SwipableWrapper';
25
25
 
26
26
  export const OpenChannelDetailsButton = () => {
27
27
  const {
@@ -120,9 +120,10 @@ export const ChannelSwipableWrapper = ({
120
120
  {children}
121
121
  </SwipableWrapper>
122
122
  <BottomSheetModal
123
+ enableDynamicSizing={true}
123
124
  onClose={() => setChannelDetailSheetOpen(false)}
124
125
  visible={channelDetailSheetOpen}
125
- height={356}
126
+ height={424}
126
127
  >
127
128
  <ChannelDetailsBottomSheetComponent channel={channel} items={sheetItems} />
128
129
  </BottomSheetModal>
@@ -11,7 +11,7 @@ import { ChannelDetailsBottomSheet } from '../ChannelDetailsBottomSheet';
11
11
 
12
12
  const mockStreamBottomSheetModalFlatList = jest.fn(() => null);
13
13
 
14
- jest.mock('../../UIComponents', () => ({
14
+ jest.mock('../../UIComponents/StreamBottomSheetModalFlatList', () => ({
15
15
  StreamBottomSheetModalFlatList: (...args: unknown[]) =>
16
16
  mockStreamBottomSheetModalFlatList(...args),
17
17
  }));
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+
3
+ import { render } from '@testing-library/react-native';
4
+
5
+ import { generateGiphyAttachment } from '../../../mock-builders/generator/attachment';
6
+ import { generateMessage } from '../../../mock-builders/generator/message';
7
+ import { generateUser } from '../../../mock-builders/generator/user';
8
+ import { getTestClientWithUser } from '../../../mock-builders/mock';
9
+ import { Chat } from '../../Chat/Chat';
10
+ import { ChannelLastMessagePreview } from '../ChannelLastMessagePreview';
11
+
12
+ describe('ChannelLastMessagePreview', () => {
13
+ it('shows Giphy instead of slash-command text for giphy attachments with quoted replies', async () => {
14
+ const client = await getTestClientWithUser({ id: 'preview-user' });
15
+ const user = generateUser();
16
+ const message = generateMessage({
17
+ attachments: [generateGiphyAttachment()],
18
+ quoted_message: generateMessage({ text: 'quoted message', user }),
19
+ text: '/giphy Cat',
20
+ user,
21
+ });
22
+
23
+ const { getByText, queryByText } = render(
24
+ <Chat client={client}>
25
+ <ChannelLastMessagePreview message={message} />
26
+ </Chat>,
27
+ );
28
+
29
+ expect(getByText('Giphy')).toBeTruthy();
30
+ expect(queryByText('/giphy Cat')).toBeNull();
31
+ });
32
+ });
@@ -31,7 +31,7 @@ const mockSwipableWrapper = jest.fn(
31
31
  },
32
32
  );
33
33
 
34
- jest.mock('../../../contexts', () => ({
34
+ jest.mock('../../../contexts/themeContext/ThemeContext', () => ({
35
35
  useTheme: () => ({
36
36
  theme: {
37
37
  semantics: {
@@ -50,8 +50,11 @@ jest.mock('../../../contexts/swipeableContext/SwipeRegistryContext', () => ({
50
50
  }),
51
51
  }));
52
52
 
53
- jest.mock('../../UIComponents', () => ({
53
+ jest.mock('../../UIComponents/BottomSheetModal', () => ({
54
54
  BottomSheetModal: ({ children }: React.PropsWithChildren) => <>{children}</>,
55
+ }));
56
+
57
+ jest.mock('../../UIComponents/SwipableWrapper', () => ({
55
58
  RightActions: ({ items }: { items: Array<{ action: () => void; id: string }> }) => {
56
59
  rightActionsProbe.items = items;
57
60
  return null;
@@ -12,6 +12,7 @@ import type {
12
12
  ImageGalleryAsset,
13
13
  ImageGalleryState,
14
14
  } from '../../../state-store/image-gallery-state-store';
15
+ import { primitives } from '../../../theme';
15
16
  import { FileTypes } from '../../../types/types';
16
17
  import { StreamBottomSheetModalFlatList } from '../../UIComponents/StreamBottomSheetModalFlatList';
17
18
 
@@ -108,8 +109,9 @@ const useStyles = () => {
108
109
  return StyleSheet.create({
109
110
  contentContainer: {
110
111
  flexGrow: 1,
111
- ...contentContainer,
112
112
  backgroundColor: semantics.backgroundCoreApp,
113
+ marginTop: primitives.spacingSm,
114
+ ...contentContainer,
113
115
  },
114
116
  image: { margin: 1, ...gridImage },
115
117
  });
@@ -6,7 +6,7 @@ import { useTranslationContext } from '../../contexts/translationContext/Transla
6
6
  import { primitives } from '../../theme';
7
7
  import { Spinner } from '../UIComponents/Spinner';
8
8
 
9
- type LoadingIndicatorWrapperProps = { text: string };
9
+ type LoadingIndicatorWrapperProps = { text: string | undefined };
10
10
 
11
11
  const LoadingIndicatorWrapper = ({ text }: LoadingIndicatorWrapperProps) => {
12
12
  const styles = useStyles();
@@ -14,9 +14,11 @@ const LoadingIndicatorWrapper = ({ text }: LoadingIndicatorWrapperProps) => {
14
14
  return (
15
15
  <View style={styles.container}>
16
16
  <Spinner height={20} width={20} />
17
- <Text style={styles.loadingText} testID='loading'>
18
- {text}
19
- </Text>
17
+ {text ? (
18
+ <Text style={styles.loadingText} testID='loading'>
19
+ {text}
20
+ </Text>
21
+ ) : null}
20
22
  </View>
21
23
  );
22
24
  };
@@ -44,7 +46,7 @@ export const LoadingIndicator = (props: LoadingProps) => {
44
46
  case 'message':
45
47
  return <LoadingIndicatorWrapper text={t('Loading messages...')} />;
46
48
  case 'threads':
47
- return <LoadingIndicatorWrapper text={t('Loading threads...')} />;
49
+ return <LoadingIndicatorWrapper text={undefined} />;
48
50
  default:
49
51
  return <LoadingIndicatorWrapper text={t('Loading...')} />;
50
52
  }
@@ -381,21 +381,12 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
381
381
  }
382
382
  };
383
383
 
384
- const onPressQuotedMessage = (quotedMessage: LocalMessage) => {
385
- if (!goToMessage) {
386
- return;
387
- }
388
-
389
- goToMessage(quotedMessage.id);
390
- };
391
-
392
384
  const errorOrFailed = message.type === 'error' || message.status === MessageStatusTypes.FAILED;
393
385
 
394
386
  const onPress = (error = errorOrFailed) => {
395
387
  if (dismissKeyboardOnMessageTouch) {
396
388
  dismissKeyboard();
397
389
  }
398
- const quotedMessage = message.quoted_message;
399
390
  if (error) {
400
391
  /**
401
392
  * If its a Blocked message, we don't do anything as per specs.
@@ -411,8 +402,6 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
411
402
  return;
412
403
  }
413
404
  showMessageOverlay();
414
- } else if (quotedMessage) {
415
- onPressQuotedMessage(quotedMessage);
416
405
  }
417
406
  };
418
407
 
@@ -500,7 +489,7 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
500
489
 
501
490
  const messageContentOrder = messageContentOrderProp.filter((content) => {
502
491
  if (content === 'quoted_reply') {
503
- return !!message.quoted_message;
492
+ return !!message.quoted_message && !hasAttachmentActions;
504
493
  }
505
494
 
506
495
  switch (content) {
@@ -711,6 +700,7 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
711
700
  goToMessage,
712
701
  groupStyles,
713
702
  handleAction,
703
+ hasAttachmentActions,
714
704
  handleReaction,
715
705
  handleToggleReaction,
716
706
  hasReactions,
@@ -121,6 +121,7 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
121
121
  FileAttachmentGroup,
122
122
  Gallery,
123
123
  groupStyles,
124
+ goToMessage,
124
125
  isMessageAIGenerated,
125
126
  isMyMessage,
126
127
  isVeryLastMessage,
@@ -221,7 +222,6 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
221
222
 
222
223
  const { setNativeScrollability } = useMessageListItemContext();
223
224
  const hasContentSideViews = !!(MessageContentLeadingView || MessageContentTrailingView);
224
-
225
225
  const contentBody = (
226
226
  <>
227
227
  <View
@@ -240,12 +240,45 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
240
240
  case 'quoted_reply':
241
241
  return (
242
242
  message.quoted_message && (
243
- <View
243
+ <Pressable
244
+ disabled={!goToMessage}
244
245
  key={`quoted_reply_${messageContentOrderIndex}`}
246
+ onLongPress={(event) => {
247
+ if (onLongPress) {
248
+ onLongPress({
249
+ emitter: 'messageContent',
250
+ event,
251
+ });
252
+ }
253
+ }}
254
+ onPress={(event) => {
255
+ if (!message.quoted_message || !goToMessage) {
256
+ return;
257
+ }
258
+
259
+ if (onPress) {
260
+ onPress({
261
+ defaultHandler: () => goToMessage(message.quoted_message!.id),
262
+ emitter: 'messageContent',
263
+ event,
264
+ });
265
+ return;
266
+ }
267
+
268
+ goToMessage(message.quoted_message.id);
269
+ }}
270
+ onPressIn={(event) => {
271
+ if (onPressIn) {
272
+ onPressIn({
273
+ emitter: 'messageContent',
274
+ event,
275
+ });
276
+ }
277
+ }}
245
278
  style={[styles.replyContainer, replyContainer]}
246
279
  >
247
280
  <Reply mode='reply' styles={replyStyles} />
248
- </View>
281
+ </Pressable>
249
282
  )
250
283
  );
251
284
  case 'attachments':
@@ -584,7 +617,8 @@ export const MessageContent = (props: MessageContentProps) => {
584
617
  const messageHasSingleFile =
585
618
  messageContentOrder.length === 1 && messageContentOrder[0] === 'files' && isSingleFile;
586
619
  const messageHasOnlyText = messageContentOrder.length === 1 && messageContentOrder[0] === 'text';
587
- const messageHasGiphyOrImgur =
620
+ const messageHasStandaloneGiphyOrImgur =
621
+ !message.quoted_message &&
588
622
  otherAttachments.filter(
589
623
  (file) => file.type === FileTypes.Giphy || file.type === FileTypes.Imgur,
590
624
  ).length > 0;
@@ -594,17 +628,20 @@ export const MessageContent = (props: MessageContentProps) => {
594
628
  messageHasSingleMedia ||
595
629
  messageHasSingleFile ||
596
630
  messageHasOnlyText ||
597
- messageHasGiphyOrImgur;
631
+ messageHasStandaloneGiphyOrImgur;
598
632
 
599
633
  const hidePaddingHorizontal =
600
- messageHasPoll || messageHasSingleMedia || messageHasSingleFile || messageHasGiphyOrImgur;
634
+ messageHasPoll ||
635
+ messageHasSingleMedia ||
636
+ messageHasSingleFile ||
637
+ messageHasStandaloneGiphyOrImgur;
601
638
 
602
639
  const hidePaddingBottom =
603
640
  messageHasPoll ||
604
641
  messageHasSingleMedia ||
605
642
  messageHasSingleFile ||
606
643
  messageHasOnlyText ||
607
- messageHasGiphyOrImgur ||
644
+ messageHasStandaloneGiphyOrImgur ||
608
645
  (messageContentOrder.length > 1 &&
609
646
  messageContentOrder[messageContentOrder.length - 1] === 'text');
610
647
 
@@ -17,6 +17,7 @@ import { useTheme } from '../../../contexts/themeContext/ThemeContext';
17
17
  import { useStableCallback } from '../../../hooks/useStableCallback';
18
18
 
19
19
  import { primitives } from '../../../theme';
20
+ import { FileTypes } from '../../../types/types';
20
21
  import { checkMessageEquality, checkQuotedMessageEquality } from '../../../utils/utils';
21
22
  import { useMessageData } from '../hooks/useMessageData';
22
23
 
@@ -199,6 +200,7 @@ export type MessageItemViewPropsWithContext = Pick<
199
200
  | 'alignment'
200
201
  | 'channel'
201
202
  | 'groupStyles'
203
+ | 'hasAttachmentActions'
202
204
  | 'isMyMessage'
203
205
  | 'message'
204
206
  | 'onlyEmojis'
@@ -240,6 +242,7 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
240
242
  enableMessageGroupingByUser,
241
243
  enableSwipeToReply,
242
244
  groupStyles,
245
+ hasAttachmentActions,
243
246
  isMyMessage,
244
247
  message,
245
248
  MessageAuthor,
@@ -293,10 +296,15 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
293
296
  });
294
297
 
295
298
  const groupStyle = `${alignment}_${groupStyles?.[0]?.toLowerCase?.()}`;
299
+ const hasVisibleQuotedReply = !!message.quoted_message && !hasAttachmentActions;
300
+ const hasStandaloneGiphyOrImgur =
301
+ !hasVisibleQuotedReply &&
302
+ otherAttachments.length > 0 &&
303
+ (otherAttachments[0].type === FileTypes.Giphy || otherAttachments[0].type === FileTypes.Imgur);
296
304
 
297
- let noBorder = onlyEmojis && !message.quoted_message;
305
+ let noBorder = onlyEmojis && !hasVisibleQuotedReply;
298
306
  if (otherAttachments.length) {
299
- if (otherAttachments[0].type === 'giphy' && !isMyMessage) {
307
+ if (hasStandaloneGiphyOrImgur && !isMyMessage) {
300
308
  noBorder = false;
301
309
  } else {
302
310
  noBorder = true;
@@ -304,12 +312,10 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
304
312
  }
305
313
 
306
314
  let backgroundColor = semantics.chatBgOutgoing;
307
- if (onlyEmojis && !message.quoted_message) {
315
+ if (onlyEmojis && !hasVisibleQuotedReply) {
316
+ backgroundColor = 'transparent';
317
+ } else if (hasStandaloneGiphyOrImgur) {
308
318
  backgroundColor = 'transparent';
309
- } else if (otherAttachments.length) {
310
- if (otherAttachments[0].type === 'giphy') {
311
- backgroundColor = 'transparent';
312
- }
313
319
  } else if (isMessageReceivedOrErrorType) {
314
320
  backgroundColor = semantics.chatBgIncoming;
315
321
  }
@@ -519,6 +525,7 @@ export const MessageItemView = (props: MessageItemViewProps) => {
519
525
  alignment,
520
526
  channel,
521
527
  groupStyles,
528
+ hasAttachmentActions,
522
529
  isMyMessage,
523
530
  message,
524
531
  contextMenuAnchorRef,
@@ -560,6 +567,7 @@ export const MessageItemView = (props: MessageItemViewProps) => {
560
567
  enableMessageGroupingByUser,
561
568
  enableSwipeToReply,
562
569
  groupStyles,
570
+ hasAttachmentActions,
563
571
  isMyMessage,
564
572
  message,
565
573
  MessageAuthor,
@@ -235,7 +235,7 @@ const useStyles = () => {
235
235
  gap: primitives.spacingXs,
236
236
  },
237
237
  messageRepliesText: {
238
- color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.textPrimary,
238
+ color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.textLink,
239
239
  fontSize: primitives.typographyFontSizeSm,
240
240
  fontWeight: primitives.typographyFontWeightSemiBold,
241
241
  lineHeight: primitives.typographyLineHeightTight,
@@ -29,7 +29,6 @@ const MessageStatusWithContext = (props: MessageStatusPropsWithContext) => {
29
29
  messageItemView: {
30
30
  status: { checkAllIcon, checkIcon, container, timeIcon },
31
31
  },
32
- semantics,
33
32
  },
34
33
  } = useTheme();
35
34
 
@@ -54,14 +53,14 @@ const MessageStatusWithContext = (props: MessageStatusPropsWithContext) => {
54
53
  {read ? (
55
54
  <CheckAll
56
55
  height={16}
57
- stroke={semantics.accentPrimary}
56
+ stroke={styles.readCheck.color}
58
57
  width={16}
59
58
  accessibilityLabel='Read'
60
59
  {...checkAllIcon}
61
60
  />
62
61
  ) : delivered ? (
63
62
  <CheckAll
64
- stroke={semantics.chatTextTimestamp}
63
+ stroke={styles.deliveredCheck.color}
65
64
  height={16}
66
65
  width={16}
67
66
  accessibilityLabel='Delivered'
@@ -69,7 +68,7 @@ const MessageStatusWithContext = (props: MessageStatusPropsWithContext) => {
69
68
  />
70
69
  ) : sending ? (
71
70
  <Time
72
- stroke={semantics.chatTextTimestamp}
71
+ stroke={styles.sendingCheck.color}
73
72
  height={16}
74
73
  width={16}
75
74
  accessibilityLabel='Sending'
@@ -77,7 +76,7 @@ const MessageStatusWithContext = (props: MessageStatusPropsWithContext) => {
77
76
  />
78
77
  ) : sent ? (
79
78
  <Check
80
- stroke={semantics.chatTextTimestamp}
79
+ stroke={styles.sentCheck.color}
81
80
  height={16}
82
81
  width={16}
83
82
  accessibilityLabel='Sent'
@@ -162,6 +161,18 @@ const useStyles = () => {
162
161
  flexDirection: 'row',
163
162
  gap: primitives.spacingXxs,
164
163
  },
164
+ readCheck: {
165
+ color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.accentPrimary,
166
+ },
167
+ deliveredCheck: {
168
+ color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.chatTextTimestamp,
169
+ },
170
+ sendingCheck: {
171
+ color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.chatTextTimestamp,
172
+ },
173
+ sentCheck: {
174
+ color: shouldUseOverlayStyles ? semantics.textOnAccent : semantics.chatTextTimestamp,
175
+ },
165
176
  });
166
177
  }, [shouldUseOverlayStyles, semantics]);
167
178
  };
@@ -7,7 +7,11 @@ import { ChannelsStateProvider } from '../../../../contexts/channelsStateContext
7
7
 
8
8
  import { getOrCreateChannelApi } from '../../../../mock-builders/api/getOrCreateChannel';
9
9
  import { useMockedApis } from '../../../../mock-builders/api/useMockedApis';
10
- import { generateVideoAttachment } from '../../../../mock-builders/generator/attachment';
10
+ import {
11
+ generateAttachmentAction,
12
+ generateGiphyAttachment,
13
+ generateVideoAttachment,
14
+ } from '../../../../mock-builders/generator/attachment';
11
15
  import { generateChannelResponse } from '../../../../mock-builders/generator/channel';
12
16
  import { generateMember } from '../../../../mock-builders/generator/member';
13
17
  import { generateMessage } from '../../../../mock-builders/generator/message';
@@ -326,6 +330,73 @@ describe('MessageContent', () => {
326
330
  expect(contentContainerStyle.paddingBottom).toBe(0);
327
331
  });
328
332
 
333
+ it('keeps content padding for a quoted reply with a giphy attachment', async () => {
334
+ const user = generateUser();
335
+ const message = generateMessage({
336
+ attachments: [generateGiphyAttachment()],
337
+ quoted_message: generateMessage({ text: 'quoted message', user }),
338
+ text: '',
339
+ user,
340
+ });
341
+
342
+ renderMessage({ message });
343
+
344
+ await waitFor(() => {
345
+ expect(screen.getByTestId('message-content-wrapper')).toBeTruthy();
346
+ expect(screen.getByTestId('giphy-attachment')).toBeTruthy();
347
+ });
348
+
349
+ const giphyAttachment = screen.getByTestId('giphy-attachment');
350
+ let ancestor = giphyAttachment.parent;
351
+ let contentContainerStyle;
352
+
353
+ while (ancestor && !contentContainerStyle) {
354
+ const flattenedStyle = StyleSheet.flatten(ancestor.props.style);
355
+ if (
356
+ flattenedStyle &&
357
+ 'paddingTop' in flattenedStyle &&
358
+ 'paddingHorizontal' in flattenedStyle &&
359
+ 'paddingBottom' in flattenedStyle
360
+ ) {
361
+ contentContainerStyle = flattenedStyle;
362
+ break;
363
+ }
364
+ ancestor = ancestor.parent;
365
+ }
366
+
367
+ expect(contentContainerStyle).toBeTruthy();
368
+ expect(contentContainerStyle.paddingTop).toBeGreaterThan(0);
369
+ expect(contentContainerStyle.paddingHorizontal).toBeGreaterThan(0);
370
+ expect(contentContainerStyle.paddingBottom).toBeGreaterThan(0);
371
+ });
372
+
373
+ it('does not render the quoted reply for an ephemeral giphy preview', async () => {
374
+ const user = generateUser();
375
+ const message = generateMessage({
376
+ attachments: [
377
+ {
378
+ ...generateGiphyAttachment(),
379
+ actions: [
380
+ generateAttachmentAction(),
381
+ generateAttachmentAction(),
382
+ generateAttachmentAction(),
383
+ ],
384
+ },
385
+ ],
386
+ quoted_message: generateMessage({ text: 'quoted message', user }),
387
+ text: '',
388
+ user,
389
+ });
390
+
391
+ renderMessage({ message });
392
+
393
+ await waitFor(() => {
394
+ expect(screen.getByTestId('giphy-action-attachment')).toBeTruthy();
395
+ });
396
+
397
+ expect(screen.queryByText('quoted message')).toBeFalsy();
398
+ });
399
+
329
400
  it('renders the FileAttachment component when a file attachment exists', async () => {
330
401
  const user = generateUser();
331
402
  const message = generateMessage({
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { Text } from 'react-native';
3
+ import { StyleSheet, Text } from 'react-native';
4
4
  import { GestureDetector } from 'react-native-gesture-handler';
5
5
 
6
6
  import { cleanup, render, screen, waitFor } from '@testing-library/react-native';
@@ -10,6 +10,10 @@ import { useMessageContext } from '../../../../contexts/messageContext/MessageCo
10
10
 
11
11
  import { getOrCreateChannelApi } from '../../../../mock-builders/api/getOrCreateChannel';
12
12
  import { useMockedApis } from '../../../../mock-builders/api/useMockedApis';
13
+ import {
14
+ generateAttachmentAction,
15
+ generateGiphyAttachment,
16
+ } from '../../../../mock-builders/generator/attachment';
13
17
  import { generateChannelResponse } from '../../../../mock-builders/generator/channel';
14
18
  import { generateMember } from '../../../../mock-builders/generator/member';
15
19
  import { generateMessage } from '../../../../mock-builders/generator/message';
@@ -256,4 +260,51 @@ describe('MessageItemView', () => {
256
260
  });
257
261
  });
258
262
  });
263
+
264
+ it('keeps the message shell background for a quoted reply with a giphy attachment', async () => {
265
+ const user = generateUser();
266
+ const message = generateMessage({
267
+ attachments: [generateGiphyAttachment()],
268
+ quoted_message: generateMessage({ text: 'quoted message', user }),
269
+ text: '',
270
+ user,
271
+ });
272
+
273
+ renderMessage({ message });
274
+
275
+ await waitFor(() => {
276
+ const wrapperStyle = StyleSheet.flatten(
277
+ screen.getByTestId('message-content-wrapper').props.style,
278
+ );
279
+ expect(wrapperStyle.backgroundColor).not.toBe('transparent');
280
+ });
281
+ });
282
+
283
+ it('renders a standalone shell for an ephemeral giphy preview with a quoted reply', async () => {
284
+ const user = generateUser();
285
+ const message = generateMessage({
286
+ attachments: [
287
+ {
288
+ ...generateGiphyAttachment(),
289
+ actions: [
290
+ generateAttachmentAction(),
291
+ generateAttachmentAction(),
292
+ generateAttachmentAction(),
293
+ ],
294
+ },
295
+ ],
296
+ quoted_message: generateMessage({ text: 'quoted message', user }),
297
+ text: '',
298
+ user,
299
+ });
300
+
301
+ renderMessage({ message });
302
+
303
+ await waitFor(() => {
304
+ const wrapperStyle = StyleSheet.flatten(
305
+ screen.getByTestId('message-content-wrapper').props.style,
306
+ );
307
+ expect(wrapperStyle.backgroundColor).toBe('transparent');
308
+ });
309
+ });
259
310
  });
@@ -25,6 +25,7 @@ export const useCreateMessageContext = ({
25
25
  goToMessage,
26
26
  groupStyles,
27
27
  handleAction,
28
+ hasAttachmentActions,
28
29
  handleReaction,
29
30
  handleToggleReaction,
30
31
  hasReactions,
@@ -79,6 +80,7 @@ export const useCreateMessageContext = ({
79
80
  goToMessage,
80
81
  groupStyles: stableGroupStyles,
81
82
  handleAction,
83
+ hasAttachmentActions,
82
84
  handleReaction,
83
85
  handleToggleReaction,
84
86
  hasReactions,
@@ -116,6 +118,7 @@ export const useCreateMessageContext = ({
116
118
  alignment,
117
119
  goToMessage,
118
120
  stableGroupStyles,
121
+ hasAttachmentActions,
119
122
  hasReactions,
120
123
  messageHasOnlySingleAttachment,
121
124
  lastGroupMessage,
@@ -76,6 +76,7 @@ export const ShowThreadMessageInChannelButtonWithContext = (
76
76
  showReplyInChannel
77
77
  ? {
78
78
  backgroundColor: semantics.controlRadioCheckBgSelected,
79
+ borderWidth: 0,
79
80
  ...checkBoxActive,
80
81
  }
81
82
  : { ...checkBoxInactive },