stream-chat-react-native-core 5.36.0-beta.4 → 5.36.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +16 -16
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +3 -0
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/StickyHeader.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useShouldScrollToRecentOnNewOwnMessage.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/hooks/useScreenDimensions.js.map +1 -1
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/hooks/useViewport.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/module/components/Indicators/LoadingDot.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +16 -16
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +3 -0
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/StickyHeader.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useShouldScrollToRecentOnNewOwnMessage.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js.map +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/module/components/Spinner/Spinner.js.map +1 -1
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/hooks/useScreenDimensions.js.map +1 -1
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/hooks/useViewport.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/Skeleton.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useAppSettings.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useSyncDatabase.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/LoadingDot.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/StickyHeader.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/hooks/useShouldScrollToRecentOnNewOwnMessage.d.ts.map +1 -1
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts.map +1 -1
- package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts.map +1 -1
- package/lib/typescript/components/Spinner/Spinner.d.ts.map +1 -1
- package/lib/typescript/components/Thread/Thread.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/hooks/useScreenDimensions.d.ts.map +1 -1
- package/lib/typescript/hooks/useStreami18n.d.ts.map +1 -1
- package/lib/typescript/hooks/useViewport.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Attachment/AudioAttachment.tsx +1 -0
- package/src/components/Attachment/Gallery.tsx +1 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -0
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +1 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +1 -0
- package/src/components/Channel/Channel.tsx +12 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +1 -0
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +1 -0
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +1 -0
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +2 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +1 -0
- package/src/components/Channel/hooks/useCreateThreadContext.ts +1 -0
- package/src/components/Channel/hooks/useCreateTypingContext.ts +1 -0
- package/src/components/ChannelList/ChannelList.tsx +1 -0
- package/src/components/ChannelList/Skeleton.tsx +1 -0
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +1 -0
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +1 -0
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +1 -0
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +1 -0
- package/src/components/ChannelPreview/ChannelPreview.tsx +4 -0
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +1 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +1 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +1 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +1 -0
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +2 -0
- package/src/components/Chat/Chat.tsx +2 -0
- package/src/components/Chat/hooks/useAppSettings.ts +1 -0
- package/src/components/Chat/hooks/useCreateChatContext.ts +1 -0
- package/src/components/Chat/hooks/useIsOnline.ts +1 -0
- package/src/components/Chat/hooks/useMutedUsers.ts +1 -0
- package/src/components/Chat/hooks/useSyncDatabase.ts +1 -0
- package/src/components/ImageGallery/ImageGallery.tsx +5 -0
- package/src/components/ImageGallery/components/ImageGalleryOverlay.tsx +1 -0
- package/src/components/Indicators/LoadingDot.tsx +1 -0
- package/src/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.tsx +2 -0
- package/src/components/Message/hooks/useCreateMessageContext.ts +1 -0
- package/src/components/Message/hooks/useProcessReactions.ts +1 -0
- package/src/components/MessageInput/FileUploadPreview.tsx +10 -9
- package/src/components/MessageInput/MessageInput.tsx +13 -0
- package/src/components/MessageList/MessageList.tsx +8 -0
- package/src/components/MessageList/StickyHeader.tsx +1 -0
- package/src/components/MessageList/__tests__/MessageList.test.js +39 -1
- package/src/components/MessageList/hooks/useShouldScrollToRecentOnNewOwnMessage.ts +1 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +2 -0
- package/src/components/MessageOverlay/hooks/useFetchReactions.ts +3 -0
- package/src/components/ProgressControl/ProgressControl.tsx +1 -0
- package/src/components/ProgressControl/WaveProgressBar.tsx +2 -0
- package/src/components/Spinner/Spinner.tsx +1 -0
- package/src/components/Thread/Thread.tsx +2 -0
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +1 -0
- package/src/contexts/channelsStateContext/useChannelState.ts +3 -0
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +1 -0
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +3 -0
- package/src/contexts/overlayContext/OverlayProvider.tsx +1 -0
- package/src/hooks/useScreenDimensions.ts +2 -0
- package/src/hooks/useStreami18n.ts +1 -0
- package/src/hooks/useViewport.ts +2 -0
- package/src/version.json +1 -1
|
@@ -268,6 +268,7 @@ const MessageInputWithContext = <
|
|
|
268
268
|
setMaxNumberOfFiles(maxNumberOfFiles ?? 10);
|
|
269
269
|
|
|
270
270
|
return closeAttachmentPicker;
|
|
271
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
271
272
|
}, []);
|
|
272
273
|
|
|
273
274
|
const [hasResetImages, setHasResetImages] = useState(false);
|
|
@@ -288,6 +289,7 @@ const MessageInputWithContext = <
|
|
|
288
289
|
imageUploads.forEach((image) => removeImage(image.id));
|
|
289
290
|
}
|
|
290
291
|
return () => setSelectedImages([]);
|
|
292
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
291
293
|
}, []);
|
|
292
294
|
|
|
293
295
|
/**
|
|
@@ -300,24 +302,28 @@ const MessageInputWithContext = <
|
|
|
300
302
|
}
|
|
301
303
|
|
|
302
304
|
return () => setSelectedFiles([]);
|
|
305
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
303
306
|
}, []);
|
|
304
307
|
|
|
305
308
|
useEffect(() => {
|
|
306
309
|
if (hasResetImages === false && imageUploadsLength === 0 && selectedImagesLength === 0) {
|
|
307
310
|
setHasResetImages(true);
|
|
308
311
|
}
|
|
312
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
309
313
|
}, [imageUploadsLength, selectedImagesLength]);
|
|
310
314
|
|
|
311
315
|
useEffect(() => {
|
|
312
316
|
if (hasResetFiles === false && fileUploadsLength === 0 && selectedFilesLength === 0) {
|
|
313
317
|
setHasResetFiles(true);
|
|
314
318
|
}
|
|
319
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
315
320
|
}, [fileUploadsLength, selectedFilesLength]);
|
|
316
321
|
|
|
317
322
|
useEffect(() => {
|
|
318
323
|
if (imagesForInput === false && imageUploadsLength) {
|
|
319
324
|
imageUploads.forEach((image) => removeImage(image.id));
|
|
320
325
|
}
|
|
326
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
321
327
|
}, [imagesForInput, imageUploadsLength]);
|
|
322
328
|
|
|
323
329
|
const uploadImagesHandler = () => {
|
|
@@ -353,6 +359,7 @@ const MessageInputWithContext = <
|
|
|
353
359
|
removeImagesHandler();
|
|
354
360
|
}
|
|
355
361
|
}
|
|
362
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
356
363
|
}, [selectedImagesLength]);
|
|
357
364
|
|
|
358
365
|
useEffect(() => {
|
|
@@ -377,6 +384,7 @@ const MessageInputWithContext = <
|
|
|
377
384
|
);
|
|
378
385
|
filesToRemove.forEach((file) => removeFile(file.id));
|
|
379
386
|
}
|
|
387
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
380
388
|
}, [selectedFilesLength]);
|
|
381
389
|
|
|
382
390
|
useEffect(() => {
|
|
@@ -409,6 +417,7 @@ const MessageInputWithContext = <
|
|
|
409
417
|
);
|
|
410
418
|
}
|
|
411
419
|
}
|
|
420
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
412
421
|
}, [imageUploadsLength, hasImagePicker]);
|
|
413
422
|
|
|
414
423
|
useEffect(() => {
|
|
@@ -440,6 +449,7 @@ const MessageInputWithContext = <
|
|
|
440
449
|
);
|
|
441
450
|
}
|
|
442
451
|
}
|
|
452
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
443
453
|
}, [fileUploadsLength, hasImagePicker]);
|
|
444
454
|
|
|
445
455
|
const editingExists = !!editing;
|
|
@@ -468,6 +478,7 @@ const MessageInputWithContext = <
|
|
|
468
478
|
) {
|
|
469
479
|
resetInput();
|
|
470
480
|
}
|
|
481
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
471
482
|
}, [editingExists]);
|
|
472
483
|
|
|
473
484
|
const asyncIdsString = asyncIds.join();
|
|
@@ -484,6 +495,7 @@ const MessageInputWithContext = <
|
|
|
484
495
|
asyncIds.forEach((id) => sendMessageAsync(id));
|
|
485
496
|
sending.current = false;
|
|
486
497
|
}
|
|
498
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
487
499
|
}, [asyncIdsString, asyncUploadsString, sendMessageAsync]);
|
|
488
500
|
|
|
489
501
|
const getMembers = () => {
|
|
@@ -544,6 +556,7 @@ const MessageInputWithContext = <
|
|
|
544
556
|
if (setFocused) setFocused(true);
|
|
545
557
|
},
|
|
546
558
|
}),
|
|
559
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
547
560
|
[additionalTextInputProps],
|
|
548
561
|
);
|
|
549
562
|
|
|
@@ -290,6 +290,7 @@ const MessageListWithContext = <
|
|
|
290
290
|
|
|
291
291
|
const modifiedTheme = useMemo(
|
|
292
292
|
() => mergeThemes({ style: myMessageTheme, theme }),
|
|
293
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
293
294
|
[myMessageThemeString, theme],
|
|
294
295
|
);
|
|
295
296
|
|
|
@@ -469,6 +470,7 @@ const MessageListWithContext = <
|
|
|
469
470
|
if (getShouldMarkReadAutomatically()) {
|
|
470
471
|
markRead();
|
|
471
472
|
}
|
|
473
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
472
474
|
}, [loading, scrollToBottomButtonVisible, isInitialScrollDone]);
|
|
473
475
|
|
|
474
476
|
useEffect(() => {
|
|
@@ -535,6 +537,7 @@ const MessageListWithContext = <
|
|
|
535
537
|
|
|
536
538
|
messageListLengthBeforeUpdate.current = messageListLengthAfterUpdate;
|
|
537
539
|
topMessageBeforeUpdate.current = topMessageAfterUpdate;
|
|
540
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
538
541
|
}, [
|
|
539
542
|
threadList,
|
|
540
543
|
hasNoMoreRecentMessagesToLoad,
|
|
@@ -582,6 +585,7 @@ const MessageListWithContext = <
|
|
|
582
585
|
}, 150); // flatlist might take a bit to update, so a small delay is needed
|
|
583
586
|
}
|
|
584
587
|
}
|
|
588
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
585
589
|
}, [rawMessageList, threadList]);
|
|
586
590
|
|
|
587
591
|
// TODO: do not apply on RN 0.73 and above
|
|
@@ -963,7 +967,10 @@ const MessageListWithContext = <
|
|
|
963
967
|
viewPosition: 0.5, // try to place message in the center of the screen
|
|
964
968
|
});
|
|
965
969
|
}
|
|
970
|
+
// the message we want to scroll to has not been loaded in the state yet
|
|
971
|
+
loadChannelAroundMessage({ messageId: messageIdToScroll });
|
|
966
972
|
}, 50);
|
|
973
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
967
974
|
}, [targetedMessage, initialScrollToFirstUnreadMessage]);
|
|
968
975
|
|
|
969
976
|
const messagesWithImages =
|
|
@@ -1009,6 +1016,7 @@ const MessageListWithContext = <
|
|
|
1009
1016
|
) {
|
|
1010
1017
|
setMessages(messagesWithImages as MessageType<StreamChatGenerics>[]);
|
|
1011
1018
|
}
|
|
1019
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1012
1020
|
}, [
|
|
1013
1021
|
imageString,
|
|
1014
1022
|
isListActive,
|
|
@@ -34,6 +34,7 @@ export const StickyHeader = ({ date, DateHeader, dateString }: StickyHeaderProps
|
|
|
34
34
|
tDateTimeParser,
|
|
35
35
|
timestampTranslationKey: 'timestamp/StickyHeader',
|
|
36
36
|
});
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
38
|
}, [date]);
|
|
38
39
|
|
|
39
40
|
if (!date) return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { act, cleanup, render, waitFor } from '@testing-library/react-native';
|
|
3
|
+
import { act, cleanup, render, screen, waitFor } from '@testing-library/react-native';
|
|
4
4
|
|
|
5
5
|
import { OverlayProvider } from '../../../contexts/overlayContext/OverlayProvider';
|
|
6
6
|
import { getOrCreateChannelApi } from '../../../mock-builders/api/getOrCreateChannel';
|
|
@@ -362,4 +362,42 @@ describe('MessageList', () => {
|
|
|
362
362
|
},
|
|
363
363
|
});
|
|
364
364
|
});
|
|
365
|
+
|
|
366
|
+
it('should scroll to a message even if out of the loaded window', async () => {
|
|
367
|
+
const user1 = generateUser();
|
|
368
|
+
|
|
369
|
+
const mockedLongMessagesList = [];
|
|
370
|
+
// we need a long enough list to make sure elements aren't preloaded by the underlying FlatList
|
|
371
|
+
for (let i = 0; i <= 150; i += 1) {
|
|
372
|
+
mockedLongMessagesList.push(generateMessage({ timestamp: new Date(), user: user1 }));
|
|
373
|
+
}
|
|
374
|
+
// could be any message that is not within the initially processed ones
|
|
375
|
+
const { id: targetedMessageId, text: targetedMessageText } = mockedLongMessagesList[3];
|
|
376
|
+
const latestMessageText = mockedLongMessagesList[mockedLongMessagesList.length - 1].text;
|
|
377
|
+
|
|
378
|
+
const mockedChannel = generateChannelResponse({
|
|
379
|
+
members: [generateMember({ user: user1 })],
|
|
380
|
+
messages: mockedLongMessagesList,
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
const chatClient = await getTestClientWithUser({ id: 'testID' });
|
|
384
|
+
useMockedApis(chatClient, [getOrCreateChannelApi(mockedChannel)]);
|
|
385
|
+
const channel = chatClient.channel('messaging', mockedChannel.id);
|
|
386
|
+
await channel.watch();
|
|
387
|
+
|
|
388
|
+
render(
|
|
389
|
+
<OverlayProvider>
|
|
390
|
+
<Chat client={chatClient}>
|
|
391
|
+
<Channel channel={channel}>
|
|
392
|
+
<MessageList targetedMessage={targetedMessageId} />
|
|
393
|
+
</Channel>
|
|
394
|
+
</Chat>
|
|
395
|
+
</OverlayProvider>,
|
|
396
|
+
);
|
|
397
|
+
|
|
398
|
+
await waitFor(() => {
|
|
399
|
+
expect(screen.getByText(targetedMessageText)).toBeOnTheScreen();
|
|
400
|
+
expect(() => screen.getByText(latestMessageText)).toThrow();
|
|
401
|
+
});
|
|
402
|
+
});
|
|
365
403
|
});
|
|
@@ -163,6 +163,7 @@ const MessageOverlayWithContext = <
|
|
|
163
163
|
|
|
164
164
|
const modifiedTheme = useMemo(
|
|
165
165
|
() => mergeThemes({ style: myMessageTheme, theme }),
|
|
166
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
166
167
|
[myMessageThemeString, theme],
|
|
167
168
|
);
|
|
168
169
|
|
|
@@ -206,6 +207,7 @@ const MessageOverlayWithContext = <
|
|
|
206
207
|
useEffect(() => {
|
|
207
208
|
Keyboard.dismiss();
|
|
208
209
|
fadeScreen();
|
|
210
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
209
211
|
}, []);
|
|
210
212
|
|
|
211
213
|
const onPan = useAnimatedGestureHandler<PanGestureHandlerGestureEvent>({
|
|
@@ -69,16 +69,19 @@ export const useFetchReactions = <
|
|
|
69
69
|
} catch (error) {
|
|
70
70
|
console.log('Error fetching reactions: ', error);
|
|
71
71
|
}
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
73
|
}, [client, messageId, reactionType, sortString, next, enableOfflineSupport]);
|
|
73
74
|
|
|
74
75
|
const loadNextPage = useCallback(async () => {
|
|
75
76
|
if (next) {
|
|
76
77
|
await fetchReactions();
|
|
77
78
|
}
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
80
|
}, [fetchReactions]);
|
|
79
81
|
|
|
80
82
|
useEffect(() => {
|
|
81
83
|
fetchReactions();
|
|
84
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
82
85
|
}, [messageId, reactionType, sortString]);
|
|
83
86
|
|
|
84
87
|
return { loading, loadNextPage, reactions };
|
|
@@ -72,6 +72,7 @@ export const ProgressControl = React.memo(
|
|
|
72
72
|
state.value = progress * widthInNumbers;
|
|
73
73
|
translateX.value = progress * widthInNumbers;
|
|
74
74
|
}
|
|
75
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
76
|
}, [progress, widthInNumbers]);
|
|
76
77
|
|
|
77
78
|
const animatedStyles = useAnimatedStyle(() => ({
|
|
@@ -75,12 +75,14 @@ export const WaveProgressBar = React.memo(
|
|
|
75
75
|
state.value = stageProgress * (WAVEFORM_WIDTH * 2);
|
|
76
76
|
setEndPosition(state.value);
|
|
77
77
|
setCurrentWaveformProgress(stageProgress);
|
|
78
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
79
|
}, [progress]);
|
|
79
80
|
|
|
80
81
|
const stringifiedWaveformData = waveformData.toString();
|
|
81
82
|
|
|
82
83
|
const resampledWaveformData = useMemo(
|
|
83
84
|
() => resampleWaveformData(waveformData, amplitudesCount),
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
86
|
[amplitudesCount, stringifiedWaveformData],
|
|
85
87
|
);
|
|
86
88
|
|
|
@@ -80,6 +80,7 @@ const ThreadWithContext = <
|
|
|
80
80
|
if (thread?.id && thread.reply_count) {
|
|
81
81
|
loadMoreThreadAsync();
|
|
82
82
|
}
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
84
|
}, []);
|
|
84
85
|
|
|
85
86
|
useEffect(
|
|
@@ -91,6 +92,7 @@ const ThreadWithContext = <
|
|
|
91
92
|
onThreadDismount();
|
|
92
93
|
}
|
|
93
94
|
},
|
|
95
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
96
|
[],
|
|
95
97
|
);
|
|
96
98
|
|
|
@@ -39,12 +39,14 @@ function useStateManager<
|
|
|
39
39
|
>,
|
|
40
40
|
initialValue?: ChannelState<StreamChatGenerics>[Key],
|
|
41
41
|
) {
|
|
42
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
43
|
const memoizedInitialValue = useMemo(() => initialValue, []);
|
|
43
44
|
const value =
|
|
44
45
|
state[cid]?.[key] || (memoizedInitialValue as ChannelState<StreamChatGenerics>[Key]);
|
|
45
46
|
|
|
46
47
|
const setValue = useCallback(
|
|
47
48
|
(value: ChannelState<StreamChatGenerics>[Key]) => setState({ cid, key, value }),
|
|
49
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
50
|
[cid, key],
|
|
49
51
|
);
|
|
50
52
|
|
|
@@ -86,6 +88,7 @@ export function useChannelState<
|
|
|
86
88
|
return () => {
|
|
87
89
|
decreaseSubscriberCount({ cid });
|
|
88
90
|
};
|
|
91
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
92
|
}, []);
|
|
90
93
|
|
|
91
94
|
const [members, setMembers] = useStateManager(
|
|
@@ -34,6 +34,7 @@ export const useMessageDetailsForState = <
|
|
|
34
34
|
if (fileUploads.length || imageUploads.length) {
|
|
35
35
|
setShowMoreOptions(false);
|
|
36
36
|
}
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
38
|
}, [text, imageUploads.length, fileUploads.length]);
|
|
38
39
|
|
|
39
40
|
const messageValue =
|
|
@@ -44,6 +45,7 @@ export const useMessageDetailsForState = <
|
|
|
44
45
|
const mentionedUsers = message.mentioned_users.map((user) => user.id);
|
|
45
46
|
setMentionedUsers(mentionedUsers);
|
|
46
47
|
}
|
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
49
|
}, [messageValue]);
|
|
48
50
|
|
|
49
51
|
const mapAttachmentToFileUpload = (attachment: Attachment<StreamChatGenerics>): FileUpload => {
|
|
@@ -148,6 +150,7 @@ export const useMessageDetailsForState = <
|
|
|
148
150
|
setImageUploads(newImageUploads);
|
|
149
151
|
}
|
|
150
152
|
}
|
|
153
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
151
154
|
}, [messageValue]);
|
|
152
155
|
|
|
153
156
|
return {
|
|
@@ -25,11 +25,13 @@ export const useScreenDimensions = (rounded?: boolean) => {
|
|
|
25
25
|
return () => subscriptions?.remove();
|
|
26
26
|
}, []);
|
|
27
27
|
|
|
28
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
29
|
const vw = (percentageWidth: number) => {
|
|
29
30
|
const value = screenDimensions.width * (percentageWidth / 100);
|
|
30
31
|
return rounded ? Math.round(value) : value;
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
35
|
const vh = (percentageHeight: number) => {
|
|
34
36
|
const value = screenDimensions.height * (percentageHeight / 100);
|
|
35
37
|
return rounded ? Math.round(value) : value;
|
package/src/hooks/useViewport.ts
CHANGED
|
@@ -25,11 +25,13 @@ export const useViewport = (rounded?: boolean) => {
|
|
|
25
25
|
return () => subscriptions?.remove();
|
|
26
26
|
}, []);
|
|
27
27
|
|
|
28
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
29
|
const vw = (percentageWidth: number) => {
|
|
29
30
|
const value = viewportDimensions.width * (percentageWidth / 100);
|
|
30
31
|
return rounded ? Math.round(value) : value;
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
35
|
const vh = (percentageHeight: number) => {
|
|
34
36
|
const value = viewportDimensions.height * (percentageHeight / 100);
|
|
35
37
|
return rounded ? Math.round(value) : value;
|
package/src/version.json
CHANGED