@@ -22,9 +22,7 @@ import {
2222 ChannelContext ,
2323 ChatContext ,
2424 KeyboardContext ,
25- MessagesContext ,
2625 SuggestionsContext ,
27- ThreadContext ,
2826 TranslationContext ,
2927} from '../../context' ;
3028import iconClose from '../../images/icons/icon_close.png' ;
@@ -80,37 +78,34 @@ const InputBoxContainer = styled.View`
8078 * [Channel Context](https://getstream.github.io/stream-chat-react-native/#channelcontext),
8179 * [Chat Context](https://getstream.github.io/stream-chat-react-native/#chatcontext),
8280 * [Keyboard Context](https://getstream.github.io/stream-chat-react-native/#keyboardcontext),
83- * [Messages Context](https://getstream.github.io/stream-chat-react-native/#messagescontext),
8481 * [Suggestions Context](https://getstream.github.io/stream-chat-react-native/#suggestionscontext),
85- * [Thread Context](https://getstream.github.io/stream-chat-react-native/#threadcontext), and
8682 * [Translation Context](https://getstream.github.io/stream-chat-react-native/#translationcontext)
8783 *
8884 * @example ../docs/MessageInput.md
8985 */
9086const MessageInput = ( props ) => {
9187 const channelContext = useContext ( ChannelContext ) ;
92- const { channel, disabled = false , members, watchers } = channelContext ;
9388
9489 const chatContext = useContext ( ChatContext ) ;
9590 const { client } = chatContext ;
9691
9792 const keyboardContext = useContext ( KeyboardContext ) ;
9893 const { dismissKeyboard } = keyboardContext ;
9994
100- const messagesContext = useContext ( MessagesContext ) ;
10195 const {
96+ channel,
10297 clearEditingState,
98+ disabled = false ,
10399 editing,
104100 editMessage,
101+ members,
105102 sendMessage : sendMessageContext ,
106- } = messagesContext ;
103+ watchers,
104+ } = channelContext ;
107105
108106 const suggestionsContext = useContext ( SuggestionsContext ) ;
109107 const { setInputBoxContainerRef } = suggestionsContext ;
110108
111- // TODO: not sure if this is actually needed but adding it in from the previously all encompassing usage of withChannelContext
112- const threadContext = useContext ( ThreadContext ) ;
113-
114109 const translationContext = useContext ( TranslationContext ) ;
115110 const { t } = translationContext ;
116111
@@ -144,9 +139,7 @@ const MessageInput = (props) => {
144139 ...channelContext ,
145140 ...chatContext ,
146141 ...keyboardContext ,
147- ...messagesContext ,
148142 ...suggestionsContext ,
149- ...threadContext ,
150143 ...translationContext ,
151144 } ;
152145
0 commit comments