Skip to content

Commit d71cb3f

Browse files
committed
fix: remove thread from MessageInput
1 parent 94306e0 commit d71cb3f

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
} from '../../contexts/messagesContext/MessagesContext';
5050

5151
import { useTheme } from '../../contexts/themeContext/ThemeContext';
52-
import { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';
5352
import {
5453
TranslationContextValue,
5554
useTranslationContext,
@@ -150,7 +149,6 @@ type MessageInputPropsWithContext = Pick<
150149
| 'StopMessageStreamingButton'
151150
> &
152151
Pick<MessagesContextValue, 'Reply'> &
153-
Pick<ThreadContextValue, 'thread'> &
154152
Pick<TranslationContextValue, 't'>;
155153

156154
const textComposerStateSelector = (state: TextComposerState) => ({
@@ -829,7 +827,6 @@ const areEqual = (
829827
openPollCreationDialog: prevOpenPollCreationDialog,
830828
showPollCreationDialog: prevShowPollCreationDialog,
831829
t: prevT,
832-
thread: prevThread,
833830
threadList: prevThreadList,
834831
} = prevProps;
835832
const {
@@ -846,7 +843,6 @@ const areEqual = (
846843
openPollCreationDialog: nextOpenPollCreationDialog,
847844
showPollCreationDialog: nextShowPollCreationDialog,
848845
t: nextT,
849-
thread: nextThread,
850846
threadList: nextThreadList,
851847
} = nextProps;
852848

@@ -912,14 +908,6 @@ const areEqual = (
912908
return false;
913909
}
914910

915-
const threadEqual =
916-
prevThread?.id === nextThread?.id &&
917-
prevThread?.text === nextThread?.text &&
918-
prevThread?.reply_count === nextThread?.reply_count;
919-
if (!threadEqual) {
920-
return false;
921-
}
922-
923911
const threadListEqual = prevThreadList === nextThreadList;
924912
if (!threadListEqual) {
925913
return false;
@@ -995,8 +983,6 @@ export const MessageInput = (props: MessageInputProps) => {
995983

996984
const { Reply } = useMessagesContext();
997985

998-
const { thread } = useThreadContext();
999-
1000986
const { t } = useTranslationContext();
1001987

1002988
/**
@@ -1055,7 +1041,6 @@ export const MessageInput = (props: MessageInputProps) => {
10551041
StartAudioRecordingButton,
10561042
StopMessageStreamingButton,
10571043
t,
1058-
thread,
10591044
threadList,
10601045
uploadNewFile,
10611046
watchers,

0 commit comments

Comments
 (0)