Skip to content

Commit dcd8919

Browse files
committed
fix: selected picker bug
1 parent c9a10dd commit dcd8919

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

package/src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export type LocalMessageInputContext = {
8989
*/
9090
pickAndUploadImageFromNativePicker: () => Promise<void>;
9191
pickFile: () => Promise<void>;
92+
selectedPicker?: 'images';
9293
sendMessage: (params?: { customMessageData?: Partial<Message> }) => Promise<void>;
9394
sendThreadMessageInChannel: boolean;
9495
/**
@@ -684,6 +685,7 @@ export const MessageInputProvider = ({
684685
...value,
685686
closePollCreationDialog,
686687
openPollCreationDialog,
688+
selectedPicker,
687689
sendMessage, // overriding the originally passed in sendMessage
688690
showPollCreationDialog,
689691
});

package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const useCreateMessageInputContext = ({
6363
openPollCreationDialog,
6464
pickAndUploadImageFromNativePicker,
6565
pickFile,
66+
selectedPicker,
6667
SendButton,
6768
sendMessage,
6869
SendMessageDisallowedIndicator,
@@ -145,6 +146,7 @@ export const useCreateMessageInputContext = ({
145146
openPollCreationDialog,
146147
pickAndUploadImageFromNativePicker,
147148
pickFile,
149+
selectedPicker,
148150
SendButton,
149151
sendMessage,
150152
SendMessageDisallowedIndicator,
@@ -170,6 +172,7 @@ export const useCreateMessageInputContext = ({
170172
sendThreadMessageInChannel,
171173
threadId,
172174
showPollCreationDialog,
175+
selectedPicker,
173176
],
174177
);
175178

0 commit comments

Comments
 (0)