Skip to content

Commit 35d82f9

Browse files
committed
chore: temporarily comment out commands feature
1 parent fc00aa4 commit 35d82f9

File tree

6 files changed

+27
-7
lines changed

6 files changed

+27
-7
lines changed

package/src/components/AutoCompleteInput/AutoCompleteInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ type AutoCompleteInputPropsWithContext = TextInputProps &
4242
type AutoCompleteInputProps = Partial<AutoCompleteInputPropsWithContext>;
4343

4444
const textComposerStateSelector = (state: TextComposerState) => ({
45-
command: state.command,
45+
// TODO: Comment out once the commands PR has been merged on the LLC
46+
// command: state.command,
47+
command: null,
4648
text: state.text,
4749
});
4850

package/src/components/MessageInput/InputButtons.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ export type InputButtonsWithContextProps = Pick<
3535
Pick<OwnCapabilitiesContextValue, 'uploadFile'>;
3636

3737
const textComposerStateSelector = (state: TextComposerState) => ({
38-
command: state.command,
38+
// TODO: Comment out once the commands PR has been merged on the LLC
39+
// command: state.command,
40+
command: null,
3941
hasText: !!state.text,
4042
});
4143

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ type MessageInputPropsWithContext = Partial<
173173
Pick<MessageComposerAPIContextValue, 'clearEditingState'> & { editing: boolean };
174174

175175
const textComposerStateSelector = (state: TextComposerState) => ({
176-
command: state.command,
176+
// TODO: Comment out once the commands PR has been merged on the LLC
177+
// command: state.command,
178+
command: null,
177179
hasText: !!state.text,
178180
mentionedUsers: state.mentionedUsers,
179181
suggestions: state.suggestions,

package/src/components/MessageInput/SendButton.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ export type SendButtonProps = Partial<Pick<MessageInputContextValue, 'sendMessag
2020
disabled: boolean;
2121
};
2222

23+
// TODO: Comment out once the commands PR has been merged on the LLC
24+
// @ts-ignore
2325
const textComposerStateSelector = (state: TextComposerState) => ({
24-
command: state.command,
26+
// TODO: Comment out once the commands PR has been merged on the LLC
27+
// command: state.command,
28+
command: null,
2529
});
2630

2731
export const SendButton = (props: SendButtonProps) => {

package/src/components/MessageInput/components/CommandInput.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ export type CommandInputProps = Partial<
2222
disabled: boolean;
2323
};
2424
const textComposerStateSelector = (state: TextComposerState) => ({
25-
command: state.command,
25+
// TODO: Comment out once the commands PR has been merged on the LLC
26+
// command: state.command,
27+
command: null,
28+
text: state.text,
2629
});
2730

2831
export const CommandInput = ({
@@ -49,15 +52,18 @@ export const CommandInput = ({
4952
} = useTheme();
5053

5154
const onCloseHandler = () => {
52-
textComposer.clearCommand();
55+
// TODO: Comment out once the commands PR has been merged on the LLC
56+
// textComposer.clearCommand();
5357
messageComposer?.restore();
5458
};
5559

5660
if (!command) {
5761
return null;
5862
}
5963

60-
const commandName = (command.name ?? '').toUpperCase();
64+
// TODO: Comment out once the commands PR has been merged on the LLC
65+
// const commandName = (command.name ?? '').toUpperCase();
66+
const commandName = '';
6167

6268
return (
6369
<View style={[styles.autoCompleteInputContainer, autoCompleteInputContainer]}>

package/src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ import { Alert, Keyboard, Linking, TextInput, TextInputProps } from 'react-nativ
1111

1212
import { BottomSheetHandleProps } from '@gorhom/bottom-sheet';
1313
import {
14+
// createCommandInjectionMiddleware,
15+
// createCommandStringExtractionMiddleware,
16+
// createDraftCommandInjectionMiddleware,
1417
LocalMessage,
1518
Message,
1619
SendMessageOptions,
1720
StreamChat,
1821
Message as StreamMessage,
22+
// TextComposerMiddleware,
1923
UpdateMessageOptions,
2024
UploadRequestFn,
2125
UserResponse,

0 commit comments

Comments
 (0)