@@ -51,6 +51,7 @@ import {
5151} from '../../contexts/messageOverlayContext/MessageOverlayContext' ;
5252import {
5353 MessagesContextValue ,
54+ MessagesProvider ,
5455 useMessagesContext ,
5556} from '../../contexts/messagesContext/MessagesContext' ;
5657import {
@@ -141,6 +142,8 @@ export type MessagePropsWithContext<
141142 | 'isAdmin'
142143 | 'isModerator'
143144 | 'isOwner'
145+ | 'members'
146+ | 'readEventsEnabled'
144147> &
145148 Pick < ChatContextValue < At , Ch , Co , Ev , Me , Re , Us > , 'client' > &
146149 Pick < KeyboardContextValue , 'dismissKeyboard' > &
@@ -295,6 +298,7 @@ const MessageWithContext = <
295298 isModerator,
296299 isOwner,
297300 lastReceivedId,
301+ members,
298302 message,
299303 messageActions : messageActionsProp ,
300304 messageContentOrder : messageContentOrderProp ,
@@ -310,6 +314,7 @@ const MessageWithContext = <
310314 OverlayReactionList,
311315 preventPress,
312316 reactionsEnabled,
317+ readEventsEnabled,
313318 removeMessage,
314319 repliesEnabled,
315320 reply : replyProp ,
@@ -949,6 +954,8 @@ const MessageWithContext = <
949954 alignment,
950955 animatedLongPress,
951956 canModifyMessage,
957+ channel,
958+ disabled,
952959 files : attachments . files ,
953960 groupStyles : forwardedGroupStyles ,
954961 handleAction,
@@ -959,6 +966,7 @@ const MessageWithContext = <
959966 forwardedGroupStyles ?. [ 0 ] === 'single' ||
960967 forwardedGroupStyles ?. [ 0 ] === 'bottom' ,
961968 lastReceivedId,
969+ members,
962970 message,
963971 messageContentOrder,
964972 onLongPress : animatedLongPress
@@ -981,6 +989,7 @@ const MessageWithContext = <
981989 otherAttachments : attachments . other ,
982990 preventPress,
983991 reactions,
992+ readEventsEnabled,
984993 showAvatar,
985994 showMessageOverlay,
986995 showMessageStatus :
@@ -1063,9 +1072,18 @@ const MessageWithContext = <
10631072 targetedStyle ,
10641073 ] }
10651074 />
1066- < MessageProvider value = { messageContext } >
1067- < MessageSimple />
1068- </ MessageProvider >
1075+ { /**
1076+ * MessagesProvider is here to prevent and issue where FlatList
1077+ * and context re-rendering causes memoization to be skipped.
1078+ * We will separate messages to another context and keep the
1079+ * components currently in the same context apart to remove
1080+ * the need for this in a future PR.
1081+ */ }
1082+ < MessagesProvider value = { messagesContext } >
1083+ < MessageProvider value = { messageContext } >
1084+ < MessageSimple />
1085+ </ MessageProvider >
1086+ </ MessagesProvider >
10691087 </ Animated . View >
10701088 </ TapGestureHandler >
10711089 </ Animated . View >
@@ -1221,6 +1239,8 @@ export const Message = <
12211239 isAdmin,
12221240 isModerator,
12231241 isOwner,
1242+ members,
1243+ readEventsEnabled,
12241244 } = useChannelContext < At , Ch , Co , Ev , Me , Re , Us > ( ) ;
12251245 const { client } = useChatContext < At , Ch , Co , Ev , Me , Re , Us > ( ) ;
12261246 const { dismissKeyboard } = useKeyboardContext ( ) ;
@@ -1242,8 +1262,10 @@ export const Message = <
12421262 isAdmin,
12431263 isModerator,
12441264 isOwner,
1265+ members,
12451266 messagesContext,
12461267 openThread,
1268+ readEventsEnabled,
12471269 setData,
12481270 setOverlay,
12491271 t,
0 commit comments