@@ -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 ,
@@ -934,6 +939,8 @@ const MessageWithContext = <
934939 alignment,
935940 animatedLongPress,
936941 canModifyMessage,
942+ channel,
943+ disabled,
937944 files : attachments . files ,
938945 groupStyles : forwardedGroupStyles ,
939946 handleAction,
@@ -944,6 +951,7 @@ const MessageWithContext = <
944951 forwardedGroupStyles [ 0 ] === 'single' ||
945952 forwardedGroupStyles [ 0 ] === 'bottom' ,
946953 lastReceivedId,
954+ members,
947955 message,
948956 messageContentOrder,
949957 onLongPress : animatedLongPress
@@ -966,6 +974,7 @@ const MessageWithContext = <
966974 otherAttachments : attachments . other ,
967975 preventPress,
968976 reactions,
977+ readEventsEnabled,
969978 showAvatar,
970979 showMessageOverlay,
971980 showMessageStatus :
@@ -1048,9 +1057,18 @@ const MessageWithContext = <
10481057 targetedStyle ,
10491058 ] }
10501059 />
1051- < MessageProvider value = { messageContext } >
1052- < MessageSimple />
1053- </ MessageProvider >
1060+ { /**
1061+ * MessagesProvider is here to prevent and issue where FlatList
1062+ * and context re-rendering causes memoization to be skipped.
1063+ * We will separate messages to another context and keep the
1064+ * components currently in the same context apart to remove
1065+ * the need for this in a future PR.
1066+ */ }
1067+ < MessagesProvider value = { messagesContext } >
1068+ < MessageProvider value = { messageContext } >
1069+ < MessageSimple />
1070+ </ MessageProvider >
1071+ </ MessagesProvider >
10541072 </ Animated . View >
10551073 </ TapGestureHandler >
10561074 </ Animated . View >
@@ -1206,6 +1224,8 @@ export const Message = <
12061224 isAdmin,
12071225 isModerator,
12081226 isOwner,
1227+ members,
1228+ readEventsEnabled,
12091229 } = useChannelContext < At , Ch , Co , Ev , Me , Re , Us > ( ) ;
12101230 const { client } = useChatContext < At , Ch , Co , Ev , Me , Re , Us > ( ) ;
12111231 const { dismissKeyboard } = useKeyboardContext ( ) ;
@@ -1227,8 +1247,10 @@ export const Message = <
12271247 isAdmin,
12281248 isModerator,
12291249 isOwner,
1250+ members,
12301251 messagesContext,
12311252 openThread,
1253+ readEventsEnabled,
12321254 setData,
12331255 setOverlay,
12341256 t,
0 commit comments