@@ -3,10 +3,7 @@ import { Pressable, StyleSheet, Text, View } from 'react-native';
33
44import { MessageComposerState } from 'stream-chat' ;
55
6- import {
7- ChannelContextValue ,
8- useChannelContext ,
9- } from '../../contexts/channelContext/ChannelContext' ;
6+ import { ChannelContextValue } from '../../contexts/channelContext/ChannelContext' ;
107import { useMessageComposer } from '../../contexts/messageInputContext/hooks/useMessageComposer' ;
118import { useTheme } from '../../contexts/themeContext/ThemeContext' ;
129import { ThreadContextValue , useThreadContext } from '../../contexts/threadContext/ThreadContext' ;
@@ -25,8 +22,7 @@ export type ShowThreadMessageInChannelButtonWithContextProps = Pick<
2522 ThreadContextValue ,
2623 'allowThreadMessagesInChannel'
2724> &
28- Pick < TranslationContextValue , 't' > &
29- Pick < ChannelContextValue , 'threadList' > ;
25+ Pick < TranslationContextValue , 't' > & { threadList ?: ChannelContextValue [ 'threadList' ] } ;
3026
3127export const ShowThreadMessageInChannelButtonWithContext = (
3228 props : ShowThreadMessageInChannelButtonWithContextProps ,
@@ -129,7 +125,6 @@ export type ShowThreadMessageInChannelButtonProps =
129125 Partial < ShowThreadMessageInChannelButtonWithContextProps > ;
130126
131127export const ShowThreadMessageInChannelButton = ( props : ShowThreadMessageInChannelButtonProps ) => {
132- const { threadList } = useChannelContext ( ) ;
133128 const { t } = useTranslationContext ( ) ;
134129 const { allowThreadMessagesInChannel } = useThreadContext ( ) ;
135130
@@ -138,7 +133,6 @@ export const ShowThreadMessageInChannelButton = (props: ShowThreadMessageInChann
138133 { ...{
139134 allowThreadMessagesInChannel,
140135 t,
141- threadList,
142136 } }
143137 { ...props }
144138 />
0 commit comments