Skip to content

Commit e62153c

Browse files
committed
chore: resolve conflicts
2 parents 1f3ca13 + d958b47 commit e62153c

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

package/src/components/ChannelList/__tests__/ChannelList.test.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { ChannelList } from '../ChannelList';
4040
*/
4141
const ChannelPreviewComponent = ({ channel, setActiveChannel }) => (
4242
<View accessibilityLabel='list-item' onPress={setActiveChannel} testID={channel.id}>
43-
<Text>{channel.data.name}</Text>
43+
<Text>{channel.data?.name}</Text>
4444
<Text>{channel.state.messages[0]?.text}</Text>
4545
</View>
4646
);
@@ -157,7 +157,7 @@ describe('ChannelList', () => {
157157
return deferredCallForStaleFilter.promise;
158158
});
159159

160-
render(
160+
const { rerender, queryByTestId } = render(
161161
<Chat client={chatClient}>
162162
<ChannelList {...props} filters={staleFilter} />
163163
</Chat>,
@@ -172,10 +172,10 @@ describe('ChannelList', () => {
172172
);
173173

174174
await waitFor(() => {
175-
expect(screen.getByTestId('channel-list')).toBeTruthy();
175+
expect(queryByTestId('channel-list')).toBeTruthy();
176176
});
177177

178-
screen.rerender(
178+
rerender(
179179
<Chat client={chatClient}>
180180
<ChannelList {...props} filters={freshFilter} />
181181
</Chat>,
@@ -189,11 +189,13 @@ describe('ChannelList', () => {
189189
expect.anything(),
190190
);
191191

192-
deferredCallForStaleFilter.resolve(staleChannel);
193-
deferredCallForFreshFilter.resolve(freshChannel);
192+
await act(() => {
193+
deferredCallForStaleFilter.resolve(staleChannel);
194+
deferredCallForFreshFilter.resolve(freshChannel);
195+
});
194196
await waitFor(() => {
195-
expect(screen.getByTestId('channel-list')).toBeTruthy();
196-
expect(screen.getByTestId('new-channel')).toBeTruthy();
197+
expect(queryByTestId('channel-list')).toBeTruthy();
198+
expect(queryByTestId('new-channel')).toBeTruthy();
197199
});
198200
});
199201

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import {
6464
NativeHandlers,
6565
} from '../../native';
6666
import { AIStates, useAIState } from '../AITypingIndicatorView';
67-
import { AttachmentPickerProps } from '../AttachmentPicker/AttachmentPicker';
6867
import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
6968
import { CreatePoll } from '../Poll/CreatePollContent';
7069

@@ -106,20 +105,10 @@ const styles = StyleSheet.create({
106105
},
107106
});
108107

109-
type MessageInputPropsWithContext = Partial<
110-
Pick<
111-
AttachmentPickerProps,
112-
| 'AttachmentPickerError'
113-
| 'AttachmentPickerErrorImage'
114-
| 'AttachmentPickerIOSSelectMorePhotos'
115-
| 'ImageOverlaySelectedComponent'
116-
| 'attachmentPickerErrorButtonText'
117-
| 'attachmentPickerErrorText'
118-
| 'numberOfAttachmentImagesToLoadPerCall'
119-
| 'numberOfAttachmentPickerImageColumns'
120-
>
108+
type MessageInputPropsWithContext = Pick<
109+
AttachmentPickerContextValue,
110+
'bottomInset' | 'selectedPicker'
121111
> &
122-
Pick<AttachmentPickerContextValue, 'bottomInset' | 'bottomSheetRef' | 'selectedPicker'> &
123112
Pick<ChatContextValue, 'isOnline'> &
124113
Pick<ChannelContextValue, 'channel' | 'members' | 'threadList' | 'watchers'> &
125114
Pick<
@@ -130,9 +119,7 @@ type MessageInputPropsWithContext = Partial<
130119
| 'asyncMessagesMinimumPressDuration'
131120
| 'asyncMessagesSlideToCancelDistance'
132121
| 'asyncMessagesMultiSendEnabled'
133-
| 'attachmentPickerBottomSheetHandleHeight'
134122
| 'attachmentPickerBottomSheetHeight'
135-
| 'AttachmentPickerBottomSheetHandle'
136123
| 'AttachmentPickerSelectionBar'
137124
| 'attachmentSelectionBarHeight'
138125
| 'AudioRecorder'

0 commit comments

Comments
 (0)