stream-chat-react-native-core 6.0.0-rc.9 → 6.0.0
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/README.md +1 -1
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js +53 -0
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -0
- package/lib/commonjs/components/AITypingIndicatorView/hooks/useAIState.js +59 -0
- package/lib/commonjs/components/AITypingIndicatorView/hooks/useAIState.js.map +1 -0
- package/lib/commonjs/components/AITypingIndicatorView/index.js +26 -0
- package/lib/commonjs/components/AITypingIndicatorView/index.js.map +1 -0
- package/lib/commonjs/components/Attachment/AudioAttachment.js +27 -22
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +3 -1
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +37 -133
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -4
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +478 -1045
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +4 -0
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/commonjs/components/ChannelList/Skeleton.js +7 -3
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +85 -45
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +17 -91
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +3 -24
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js +121 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelMuted.js +35 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelMuted.js.map +1 -0
- package/lib/commonjs/components/Chat/Chat.js +5 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js +15 -9
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +0 -4
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +46 -46
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +3 -4
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +2 -2
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +7 -0
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +17 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +15 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/StreamingMessageView.js +36 -0
- package/lib/commonjs/components/Message/MessageSimple/StreamingMessageView.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js +9 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +209 -23
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +2 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useStreamingMessage.js +43 -0
- package/lib/commonjs/components/Message/hooks/useStreamingMessage.js.map +1 -0
- package/lib/commonjs/components/MessageInput/MessageInput.js +41 -21
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/StopMessageStreamingButton.js +39 -0
- package/lib/commonjs/components/MessageInput/StopMessageStreamingButton.js.map +1 -0
- package/lib/commonjs/components/MessageList/MessageList.js +74 -73
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js +3 -2
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
- package/lib/commonjs/components/Poll/CreatePollContent.js +14 -9
- package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/commonjs/components/Poll/Poll.js +2 -8
- package/lib/commonjs/components/Poll/Poll.js.map +1 -1
- package/lib/commonjs/components/Poll/components/Button.js +9 -474
- package/lib/commonjs/components/Poll/components/Button.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollButtons.js +291 -0
- package/lib/commonjs/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +88 -6
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/commonjs/components/Poll/components/index.js +11 -0
- package/lib/commonjs/components/Poll/components/index.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadList.js +0 -3
- package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +11 -5
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/commonjs/components/index.js +66 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +0 -35
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +4 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +15 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/i18n/en.json +2 -0
- package/lib/commonjs/i18n/es.json +2 -0
- package/lib/commonjs/i18n/fr.json +2 -0
- package/lib/commonjs/i18n/he.json +2 -0
- package/lib/commonjs/i18n/hi.json +2 -0
- package/lib/commonjs/i18n/it.json +2 -0
- package/lib/commonjs/i18n/ja.json +2 -0
- package/lib/commonjs/i18n/ko.json +2 -0
- package/lib/commonjs/i18n/nl.json +2 -0
- package/lib/commonjs/i18n/pt-br.json +2 -0
- package/lib/commonjs/i18n/ru.json +2 -0
- package/lib/commonjs/i18n/tr.json +2 -0
- package/lib/commonjs/mock-builders/event/notificationChannelMutesUpdated.js +14 -0
- package/lib/commonjs/mock-builders/event/notificationChannelMutesUpdated.js.map +1 -0
- package/lib/commonjs/mock-builders/event/notificationMarkRead.js +14 -0
- package/lib/commonjs/mock-builders/event/notificationMarkRead.js.map +1 -0
- package/lib/commonjs/mock-builders/event/notificationMarkUnread.js +17 -0
- package/lib/commonjs/mock-builders/event/notificationMarkUnread.js.map +1 -0
- package/lib/commonjs/mock-builders/generator/channel.js +1 -0
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/store/SqliteClient.js +11 -2
- package/lib/commonjs/store/SqliteClient.js.map +1 -1
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js +8 -2
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js.map +1 -1
- package/lib/commonjs/utils/utils.js +3 -2
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js +53 -0
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -0
- package/lib/module/components/AITypingIndicatorView/hooks/useAIState.js +59 -0
- package/lib/module/components/AITypingIndicatorView/hooks/useAIState.js.map +1 -0
- package/lib/module/components/AITypingIndicatorView/index.js +26 -0
- package/lib/module/components/AITypingIndicatorView/index.js.map +1 -0
- package/lib/module/components/Attachment/AudioAttachment.js +27 -22
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +3 -1
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +37 -133
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -4
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +478 -1045
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/module/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +4 -0
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/module/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/module/components/ChannelList/Skeleton.js +7 -3
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +85 -45
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +17 -91
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +3 -24
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js +121 -0
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -0
- package/lib/module/components/ChannelPreview/hooks/useIsChannelMuted.js +35 -0
- package/lib/module/components/ChannelPreview/hooks/useIsChannelMuted.js.map +1 -0
- package/lib/module/components/Chat/Chat.js +5 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js +15 -9
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +0 -4
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +46 -46
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +3 -4
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +2 -2
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -1
- package/lib/module/components/Message/Message.js +7 -0
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +17 -4
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +15 -6
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/StreamingMessageView.js +36 -0
- package/lib/module/components/Message/MessageSimple/StreamingMessageView.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js +9 -1
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +209 -23
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +2 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useStreamingMessage.js +43 -0
- package/lib/module/components/Message/hooks/useStreamingMessage.js.map +1 -0
- package/lib/module/components/MessageInput/MessageInput.js +41 -21
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/StopMessageStreamingButton.js +39 -0
- package/lib/module/components/MessageInput/StopMessageStreamingButton.js.map +1 -0
- package/lib/module/components/MessageList/MessageList.js +74 -73
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js +3 -2
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
- package/lib/module/components/Poll/CreatePollContent.js +14 -9
- package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/module/components/Poll/Poll.js +2 -8
- package/lib/module/components/Poll/Poll.js.map +1 -1
- package/lib/module/components/Poll/components/Button.js +9 -474
- package/lib/module/components/Poll/components/Button.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/module/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/module/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/module/components/Poll/components/PollButtons.js +291 -0
- package/lib/module/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/module/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/module/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/module/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +88 -6
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/module/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/module/components/Poll/components/index.js +11 -0
- package/lib/module/components/Poll/components/index.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadList.js +0 -3
- package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +11 -5
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/module/components/index.js +66 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +0 -35
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +4 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +15 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/i18n/en.json +2 -0
- package/lib/module/i18n/es.json +2 -0
- package/lib/module/i18n/fr.json +2 -0
- package/lib/module/i18n/he.json +2 -0
- package/lib/module/i18n/hi.json +2 -0
- package/lib/module/i18n/it.json +2 -0
- package/lib/module/i18n/ja.json +2 -0
- package/lib/module/i18n/ko.json +2 -0
- package/lib/module/i18n/nl.json +2 -0
- package/lib/module/i18n/pt-br.json +2 -0
- package/lib/module/i18n/ru.json +2 -0
- package/lib/module/i18n/tr.json +2 -0
- package/lib/module/mock-builders/event/notificationChannelMutesUpdated.js +14 -0
- package/lib/module/mock-builders/event/notificationChannelMutesUpdated.js.map +1 -0
- package/lib/module/mock-builders/event/notificationMarkRead.js +14 -0
- package/lib/module/mock-builders/event/notificationMarkRead.js.map +1 -0
- package/lib/module/mock-builders/event/notificationMarkUnread.js +17 -0
- package/lib/module/mock-builders/event/notificationMarkUnread.js.map +1 -0
- package/lib/module/mock-builders/generator/channel.js +1 -0
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/store/SqliteClient.js +11 -2
- package/lib/module/store/SqliteClient.js.map +1 -1
- package/lib/module/utils/getTrimmedAttachmentTitle.js +8 -2
- package/lib/module/utils/getTrimmedAttachmentTitle.js.map +1 -1
- package/lib/module/utils/utils.js +3 -2
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AITypingIndicatorView/AITypingIndicatorView.d.ts +11 -0
- package/lib/typescript/components/AITypingIndicatorView/AITypingIndicatorView.d.ts.map +1 -0
- package/lib/typescript/components/AITypingIndicatorView/hooks/useAIState.d.ts +18 -0
- package/lib/typescript/components/AITypingIndicatorView/hooks/useAIState.d.ts.map +1 -0
- package/lib/typescript/components/AITypingIndicatorView/index.d.ts +3 -0
- package/lib/typescript/components/AITypingIndicatorView/index.d.ts.map +1 -0
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +7 -6
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts +75 -0
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts.map +1 -0
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +128 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts +28 -0
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts.map +1 -0
- package/lib/typescript/components/ChannelList/Skeleton.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 +1 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts +8 -0
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts.map +1 -0
- package/lib/typescript/components/ChannelPreview/hooks/useIsChannelMuted.d.ts +8 -0
- package/lib/typescript/components/ChannelPreview/hooks/useIsChannelMuted.d.ts.map +1 -0
- package/lib/typescript/components/Chat/Chat.d.ts +7 -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 +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/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/StreamingMessageView.d.ts +12 -0
- package/lib/typescript/components/Message/MessageSimple/StreamingMessageView.d.ts.map +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +16 -1
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useStreamingMessage.d.ts +17 -0
- package/lib/typescript/components/Message/hooks/useStreamingMessage.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/StopMessageStreamingButton.d.ts +10 -0
- package/lib/typescript/components/MessageInput/StopMessageStreamingButton.d.ts.map +1 -0
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts +3 -2
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/Poll.d.ts +0 -1
- package/lib/typescript/components/Poll/Poll.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/Button.d.ts +0 -17
- package/lib/typescript/components/Poll/components/Button.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/CreatePollOptions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollButtons.d.ts +10 -0
- package/lib/typescript/components/Poll/components/PollButtons.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollInputDialog.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts +11 -4
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts +6 -0
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +27 -25
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +0 -16
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +7 -13
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts.map +1 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +2 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -0
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +8 -4
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +17 -16
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +16 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +2 -0
- package/lib/typescript/i18n/es.json +2 -0
- package/lib/typescript/i18n/fr.json +2 -0
- package/lib/typescript/i18n/he.json +2 -0
- package/lib/typescript/i18n/hi.json +2 -0
- package/lib/typescript/i18n/it.json +2 -0
- package/lib/typescript/i18n/ja.json +2 -0
- package/lib/typescript/i18n/ko.json +2 -0
- package/lib/typescript/i18n/nl.json +2 -0
- package/lib/typescript/i18n/pt-br.json +2 -0
- package/lib/typescript/i18n/ru.json +2 -0
- package/lib/typescript/i18n/tr.json +2 -0
- package/lib/typescript/store/SqliteClient.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +3 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/getTrimmedAttachmentTitle.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +2 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/utils.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/AITypingIndicatorView/AITypingIndicatorView.tsx +50 -0
- package/src/components/AITypingIndicatorView/hooks/useAIState.ts +68 -0
- package/src/components/AITypingIndicatorView/index.ts +2 -0
- package/src/components/Attachment/AudioAttachment.tsx +20 -19
- package/src/components/Attachment/Gallery.tsx +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +7 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +16 -32
- package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +3 -5
- package/src/components/Channel/Channel.tsx +262 -821
- package/src/components/Channel/__tests__/Channel.test.js +244 -13
- package/src/components/Channel/__tests__/useMessageListPagination.test.js +419 -0
- package/src/components/Channel/hooks/useChannelDataState.ts +235 -0
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -0
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +3 -10
- package/src/components/Channel/hooks/useMessageListPagination.tsx +246 -0
- package/src/components/ChannelList/Skeleton.tsx +9 -1
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +37 -30
- package/src/components/ChannelPreview/ChannelPreview.tsx +28 -107
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +5 -15
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +2 -7
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.tsx +226 -10
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.tsx +1 -1
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewMuted.test.tsx +62 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewData.ts +138 -0
- package/src/components/ChannelPreview/hooks/useIsChannelMuted.ts +29 -0
- package/src/components/Chat/Chat.tsx +11 -2
- package/src/components/Chat/hooks/__tests__/useAppSettings.test.tsx +1 -0
- package/src/components/Chat/hooks/useAppSettings.ts +2 -0
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/components/Chat/hooks/useIsOnline.ts +0 -5
- package/src/components/ImageGallery/ImageGallery.tsx +1 -0
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +32 -32
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +5 -6
- package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx +2 -2
- package/src/components/Message/Message.tsx +16 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +22 -2
- package/src/components/Message/MessageSimple/MessageFooter.tsx +16 -5
- package/src/components/Message/MessageSimple/StreamingMessageView.tsx +34 -0
- package/src/components/Message/MessageSimple/utils/generateMarkdownText.ts +15 -1
- package/src/components/Message/MessageSimple/utils/renderText.tsx +207 -3
- package/src/components/Message/hooks/useCreateMessageContext.ts +2 -0
- package/src/components/Message/hooks/useStreamingMessage.ts +54 -0
- package/src/components/MessageInput/MessageInput.tsx +38 -20
- package/src/components/MessageInput/StopMessageStreamingButton.tsx +34 -0
- package/src/components/MessageInput/__tests__/MessageInput.test.js +116 -2
- package/src/components/MessageList/MessageList.tsx +53 -85
- package/src/components/MessageList/ScrollToBottomButton.tsx +1 -1
- package/src/components/MessageList/__tests__/MessageList.test.js +174 -2
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +1 -1
- package/src/components/MessageList/hooks/useMessageList.ts +2 -5
- package/src/components/MessageList/utils/getReadStates.ts +3 -2
- package/src/components/MessageMenu/MessageUserReactions.tsx +1 -1
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +4 -2
- package/src/components/MessageMenu/hooks/useFetchReactions.ts +6 -3
- package/src/components/Poll/CreatePollContent.tsx +4 -4
- package/src/components/Poll/Poll.tsx +1 -20
- package/src/components/Poll/components/Button.tsx +8 -420
- package/src/components/Poll/components/CreatePollIcon.tsx +1 -1
- package/src/components/Poll/components/CreatePollOptions.tsx +9 -4
- package/src/components/Poll/components/PollAnswersList.tsx +66 -3
- package/src/components/Poll/components/PollButtons.tsx +241 -0
- package/src/components/Poll/components/PollInputDialog.tsx +9 -6
- package/src/components/Poll/components/PollModalHeader.tsx +3 -3
- package/src/components/Poll/components/PollOption.tsx +74 -4
- package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +1 -1
- package/src/components/Poll/components/PollResults/PollResultItem.tsx +68 -52
- package/src/components/Poll/components/PollResults/PollVote.tsx +68 -0
- package/src/components/Poll/components/index.ts +1 -0
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +37 -4
- package/src/components/ThreadList/ThreadList.tsx +0 -2
- package/src/components/UIComponents/BottomSheetModal.tsx +7 -3
- package/src/components/index.ts +7 -0
- package/src/contexts/channelContext/ChannelContext.tsx +35 -25
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +1 -67
- package/src/contexts/channelsStateContext/useChannelState.ts +6 -108
- package/src/contexts/chatContext/ChatContext.tsx +2 -1
- package/src/contexts/messageContext/MessageContext.tsx +4 -0
- package/src/contexts/messageInputContext/MessageInputContext.tsx +5 -1
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +8 -3
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +17 -16
- package/src/contexts/themeContext/utils/theme.ts +30 -1
- package/src/i18n/en.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/he.json +2 -0
- package/src/i18n/hi.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/ko.json +2 -0
- package/src/i18n/nl.json +2 -0
- package/src/i18n/pt-br.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/mock-builders/event/notificationChannelMutesUpdated.js +7 -0
- package/src/mock-builders/event/notificationMarkRead.js +7 -0
- package/src/mock-builders/event/notificationMarkUnread.js +9 -0
- package/src/mock-builders/generator/channel.ts +1 -0
- package/src/store/SqliteClient.ts +5 -1
- package/src/types/types.ts +3 -0
- package/src/utils/getTrimmedAttachmentTitle.ts +10 -2
- package/src/utils/utils.ts +5 -2
- package/src/version.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Alert, ImageBackground,
|
|
3
|
+
import { Alert, ImageBackground, StyleSheet, Text, View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { TouchableOpacity } from '@gorhom/bottom-sheet';
|
|
6
6
|
import { lookup } from 'mime-types';
|
|
@@ -10,7 +10,6 @@ import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
|
10
10
|
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
|
|
11
11
|
import { useViewport } from '../../../hooks/useViewport';
|
|
12
12
|
import { Recorder } from '../../../icons';
|
|
13
|
-
import { getLocalAssetUri } from '../../../native';
|
|
14
13
|
import type { Asset, File } from '../../../types/types';
|
|
15
14
|
import { getDurationLabelFromDuration } from '../../../utils/utils';
|
|
16
15
|
|
|
@@ -49,18 +48,14 @@ const AttachmentVideo = (props: AttachmentVideoProps) => {
|
|
|
49
48
|
},
|
|
50
49
|
} = useTheme();
|
|
51
50
|
|
|
52
|
-
const { duration: videoDuration, uri } = asset;
|
|
51
|
+
const { duration: videoDuration, id: assetId, originalUri, uri } = asset;
|
|
53
52
|
|
|
54
53
|
const durationLabel = getDurationLabelFromDuration(videoDuration);
|
|
55
54
|
|
|
56
55
|
const size = vw(100) / (numberOfAttachmentPickerImageColumns || 3) - 2;
|
|
57
56
|
|
|
58
57
|
/* Patches video files with uri and mimetype */
|
|
59
|
-
const patchVideoFile =
|
|
60
|
-
// For the case of Expo CLI where you need to fetch the file uri from file id. Here it is only done for iOS since for android the file.uri is fine.
|
|
61
|
-
const localAssetURI =
|
|
62
|
-
Platform.OS === 'ios' && asset.id && getLocalAssetUri && (await getLocalAssetUri(asset.id));
|
|
63
|
-
const uri = localAssetURI || asset.uri || '';
|
|
58
|
+
const patchVideoFile = (files: File[]) => {
|
|
64
59
|
// We need a mime-type to upload a video file.
|
|
65
60
|
const mimeType = lookup(asset.name) || 'multipart/form-data';
|
|
66
61
|
return [
|
|
@@ -70,18 +65,19 @@ const AttachmentVideo = (props: AttachmentVideoProps) => {
|
|
|
70
65
|
id: asset.id,
|
|
71
66
|
mimeType,
|
|
72
67
|
name: asset.name,
|
|
68
|
+
originalUri,
|
|
73
69
|
size: asset.size,
|
|
74
70
|
uri,
|
|
75
71
|
},
|
|
76
72
|
];
|
|
77
73
|
};
|
|
78
74
|
|
|
79
|
-
const updateSelectedFiles =
|
|
75
|
+
const updateSelectedFiles = () => {
|
|
80
76
|
if (numberOfUploads >= maxNumberOfFiles) {
|
|
81
77
|
Alert.alert(t('Maximum number of files reached'));
|
|
82
78
|
return;
|
|
83
79
|
}
|
|
84
|
-
const files =
|
|
80
|
+
const files = patchVideoFile(selectedFiles);
|
|
85
81
|
setSelectedFiles(files);
|
|
86
82
|
};
|
|
87
83
|
|
|
@@ -89,7 +85,9 @@ const AttachmentVideo = (props: AttachmentVideoProps) => {
|
|
|
89
85
|
if (selected) {
|
|
90
86
|
setSelectedFiles((files) =>
|
|
91
87
|
// `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`
|
|
92
|
-
files.filter((file) =>
|
|
88
|
+
files.filter((file) =>
|
|
89
|
+
file.id ? file.id !== assetId : file.uri !== uri && file.originalUri !== uri,
|
|
90
|
+
),
|
|
93
91
|
);
|
|
94
92
|
} else {
|
|
95
93
|
updateSelectedFiles();
|
|
@@ -99,7 +97,7 @@ const AttachmentVideo = (props: AttachmentVideoProps) => {
|
|
|
99
97
|
return (
|
|
100
98
|
<TouchableOpacity onPress={onPressVideo}>
|
|
101
99
|
<ImageBackground
|
|
102
|
-
source={{ uri }}
|
|
100
|
+
source={{ uri: originalUri }}
|
|
103
101
|
style={[
|
|
104
102
|
{
|
|
105
103
|
height: size,
|
|
@@ -149,37 +147,23 @@ const AttachmentImage = (props: AttachmentImageProps) => {
|
|
|
149
147
|
|
|
150
148
|
const size = vw(100) / (numberOfAttachmentPickerImageColumns || 3) - 2;
|
|
151
149
|
|
|
152
|
-
const { uri } = asset;
|
|
153
|
-
|
|
154
|
-
/* Patches image files with uri */
|
|
155
|
-
const patchImageFile = async (images: Asset[]) => {
|
|
156
|
-
// For the case of Expo CLI where you need to fetch the file uri from file id. Here it is only done for iOS since for android the file.uri is fine.
|
|
157
|
-
const localAssetURI =
|
|
158
|
-
Platform.OS === 'ios' && asset.id && getLocalAssetUri && (await getLocalAssetUri(asset.id));
|
|
159
|
-
const uri = localAssetURI || asset.uri || '';
|
|
160
|
-
return [
|
|
161
|
-
...images,
|
|
162
|
-
{
|
|
163
|
-
...asset,
|
|
164
|
-
uri,
|
|
165
|
-
},
|
|
166
|
-
];
|
|
167
|
-
};
|
|
150
|
+
const { id: assetId, originalUri, uri } = asset;
|
|
168
151
|
|
|
169
|
-
const updateSelectedImages =
|
|
152
|
+
const updateSelectedImages = () => {
|
|
170
153
|
if (numberOfUploads >= maxNumberOfFiles) {
|
|
171
154
|
Alert.alert(t('Maximum number of files reached'));
|
|
172
155
|
return;
|
|
173
156
|
}
|
|
174
|
-
|
|
175
|
-
setSelectedImages(images);
|
|
157
|
+
setSelectedImages([...selectedImages, asset]);
|
|
176
158
|
};
|
|
177
159
|
|
|
178
160
|
const onPressImage = () => {
|
|
179
161
|
if (selected) {
|
|
180
162
|
// `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`
|
|
181
163
|
setSelectedImages((images) =>
|
|
182
|
-
images.filter((image) =>
|
|
164
|
+
images.filter((image) =>
|
|
165
|
+
assetId ? image.id !== assetId : image.uri !== uri && originalUri !== uri,
|
|
166
|
+
),
|
|
183
167
|
);
|
|
184
168
|
} else {
|
|
185
169
|
updateSelectedImages();
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
useChannelContext,
|
|
6
|
-
useMessagesContext,
|
|
7
|
-
useOwnCapabilitiesContext,
|
|
8
|
-
} from '../../../contexts';
|
|
9
4
|
import { useAttachmentPickerContext } from '../../../contexts/attachmentPickerContext/AttachmentPickerContext';
|
|
5
|
+
import { useChannelContext } from '../../../contexts/channelContext/ChannelContext';
|
|
10
6
|
import { useMessageInputContext } from '../../../contexts/messageInputContext/MessageInputContext';
|
|
7
|
+
import { useMessagesContext } from '../../../contexts/messagesContext/MessagesContext';
|
|
8
|
+
import { useOwnCapabilitiesContext } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
11
9
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
12
10
|
|
|
13
11
|
const styles = StyleSheet.create({
|