stream-chat-react-native-core 5.22.2-beta.4 → 5.22.2-beta.5
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/Channel/Channel.js +112 -84
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +58 -40
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -1
- package/lib/commonjs/i18n/fr.json +51 -51
- package/lib/commonjs/i18n/hi.json +51 -51
- package/lib/commonjs/i18n/it.json +51 -51
- package/lib/commonjs/i18n/nl.json +51 -51
- package/lib/commonjs/i18n/ru.json +51 -51
- package/lib/commonjs/i18n/tr.json +51 -51
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +112 -84
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +58 -40
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/i18n/en.json +1 -1
- package/lib/module/i18n/fr.json +51 -51
- package/lib/module/i18n/hi.json +51 -51
- package/lib/module/i18n/it.json +51 -51
- package/lib/module/i18n/nl.json +51 -51
- package/lib/module/i18n/ru.json +51 -51
- package/lib/module/i18n/tr.json +51 -51
- package/lib/module/version.json +1 -1
- package/lib/typescript/i18n/en.json +1 -1
- package/lib/typescript/i18n/fr.json +51 -51
- package/lib/typescript/i18n/hi.json +51 -51
- package/lib/typescript/i18n/it.json +51 -51
- package/lib/typescript/i18n/nl.json +51 -51
- package/lib/typescript/i18n/ru.json +51 -51
- package/lib/typescript/i18n/tr.json +51 -51
- package/package.json +1 -1
- package/src/components/Channel/Channel.tsx +32 -6
- package/src/components/MessageList/MessageList.tsx +44 -9
- package/src/i18n/en.json +1 -1
- package/src/i18n/fr.json +51 -51
- package/src/i18n/hi.json +51 -51
- package/src/i18n/it.json +51 -51
- package/src/i18n/nl.json +51 -51
- package/src/i18n/ru.json +51 -51
- package/src/i18n/tr.json +51 -51
- package/src/version.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useMessageList","_InlineLoadingMoreIndicator","_InlineLoadingMoreRecentIndicator","_InlineLoadingMoreThreadIndicator","_getLastReceivedMessage","_AttachmentPickerContext","_ChannelContext","_ChatContext","_DebugContext","_ImageGalleryContext","_MessagesContext","_OverlayContext","_PaginatedMessageListContext","_ThemeContext","_ThreadContext","_TranslationContext","_excluded","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT","MAX_RETRIES_AFTER_SCROLL_FAILURE","styles","StyleSheet","create","container","alignItems","flex","width","contentContainer","flexGrow","paddingBottom","invert","transform","scaleY","invertAndroid","scaleX","listContainer","stickyHeader","position","top","InvertedCellRendererComponent","props","createElement","View","_extends2","style","__self","__source","fileName","lineNumber","columnNumber","keyExtractor","item","id","created_at","toISOString","Date","now","toString","flatListViewabilityConfig","viewAreaCoveragePercentThreshold","MessageListWithContext","_getLastReceivedMessa","LoadingMoreIndicator","threadList","InlineLoadingMoreThreadIndicator","InlineLoadingMoreIndicator","additionalFlatListProps","channel","client","closePicker","DateHeader","disabled","disableTypingIndicator","EmptyStateIndicator","FlatList","_props$FooterComponen","FooterComponent","hasNoMoreRecentMessagesToLoad","_props$HeaderComponen","HeaderComponent","InlineLoadingMoreRecentIndicator","hideStickyDateHeader","initialScrollToFirstUnreadMessage","InlineDateSeparator","InlineUnreadIndicator","_props$inverted","inverted","_props$isListActive","isListActive","legacyImageViewerSwipeBehaviour","loadChannelAroundMessage","loading","LoadingIndicator","loadMore","loadMoreRecent","loadMoreThread","markRead","Message","MessageSystem","myMessageTheme","NetworkDownIndicator","noGroupByUser","onListScroll","onThreadSelect","overlay","reloadChannel","ScrollToBottomButton","selectedPicker","setFlatListRef","setMessages","setSelectedPicker","setTargetedMessage","StickyHeader","targetedMessage","tDateTimeParser","thread","_props$threadList","TypingIndicator","TypingIndicatorContainer","_useTheme","useTheme","theme","white_snow","colors","_theme$messageList","messageList","messageContainer","screenPadding","modifiedTheme","useMemo","mergeThemes","useMessageList","messageListLengthBeforeUpdate","useRef","messageListLengthAfterUpdate","length","topMessageBeforeUpdate","topMessageAfterUpdate","_useState","useState","_useState2","_slicedToArray2","autoscrollToTop","setAutoscrollToTop","onStartReachedTracker","onEndReachedTracker","onStartReachedInPromise","onEndReachedInPromise","flatListRef","_useState3","_useState4","isInitialScrollDone","setInitialScrollDone","channelResyncScrollSet","scrollToDebounceTimeoutRef","initialScrollSettingTimeoutRef","messageIdToScrollToRef","messageIdLastScrolledToRef","_useState5","_useState6","hasMoved","setHasMoved","_useState7","getLastReceivedMessage","_useState8","lastReceivedId","setLastReceivedId","_useState9","_useState10","scrollToBottomButtonVisible","setScrollToBottomButtonVisible","_useState11","_useState12","stickyHeaderDate","setStickyHeaderDate","stickyHeaderDateRef","channelRef","current","updateStickyHeaderDateIfNeeded","viewableItems","_lastItem$item","_stickyHeaderDateRef$","lastItem","pop","isMessageTypeDeleted","type","toDateString","onViewableItemsChanged","_ref","Platform","OS","resetPaginationTrackersRef","useEffect","getShouldMarkReadAutomatically","countUnread","_lastReceivedMessage$","lastReceivedMessage","hasNewMessage","isMyMessage","user","userID","scrollToBottomIfNeeded","_topMessageBeforeUpda","setTimeout","_flatListRef$current","scrollToOffset","offset","maybeCallOnStartReached","shouldApplyAndroidWorkaround","renderItem","_ref2","_message$user","index","message","disconnected","initialized","offlineMode","lastRead","isMessageUnread","messageArrayIndex","msg","isCurrentMessageUnread","showUnreadUnderlay","muteStatus","muted","insertInlineUnreadIndicator","Fragment","testID","paddingHorizontal","wrapMessageInTheme","isMessageWithStylesReadByAndDateSeparator","dateSeparator","date","ThemeProvider","mergedStyle","goToMessage","groupStyles","isTargetedMessage","undefined","quoted_message_id","_ref3","_asyncToGenerator2","_regenerator","mark","_callee","limit","callback","onError","wrap","_callee$","_context","prev","next","abrupt","Promise","resolve","then","stop","_x","apply","arguments","maybeCallOnEndReached","_ref4","_callee2","_callee2$","_context2","onScrollEvent","event","nativeEvent","contentOffset","y","visibleLength","layoutMeasurement","height","contentLength","contentSize","isScrollAtStart","isScrollAtEnd","isScrollAtBottom","showScrollToBottomButton","shouldMarkRead","handleScroll","goToNewMessages","_ref5","_callee3","_callee3$","_context3","scrollToIndexFailedRetryCountRef","failScrollTimeoutId","onScrollToIndexFailedRef","info","animated","averageItemLength","targetAgain","_flatListRef$current2","scrollToIndex","viewPosition","e","console","log","useCallback","messageId","indexOfParentInMessageList","findIndex","clearTimeout","messageIdToScroll","messagesWithImages","filter","attachments","some","attachment","title_link","og_scrape_url","image_url","thumb_url","imageString","map","_message$attachments","join","numberOfMessagesWithImages","threadExists","stickyHeaderFormatDate","getFullYear","tStickyHeaderDate","stickyHeaderDateString","isDayOrMoment","format","dismissImagePicker","onScrollBeginDrag","onScrollEndDrag","refCallback","ref","debugRef","useDebugContext","isDebugModeEnabled","__DEV__","setEventType","setSendEventParams","action","data","renderListEmptyComponent","listType","ListFooterComponent","ListHeaderComponent","StickyHeaderComponent","dateString","additionalFlatListPropsExcludingStyle","contentContainerStyle","rest","_objectWithoutProperties2","backgroundColor","CellRendererComponent","extraData","keyboardShouldPersistTaps","ListEmptyComponent","maintainVisibleContentPosition","autoscrollToTopThreshold","minIndexForVisible","maxToRenderPerBatch","onScroll","onScrollToIndexFailed","onTouchEnd","scrollEnabled","showsVerticalScrollIndicator","viewabilityConfig","onPress","showNotification","unreadCount","MessageList","_useAttachmentPickerC","useAttachmentPickerContext","_useChannelContext","useChannelContext","enableMessageGroupingByUser","error","isChannelActive","scrollToFirstUnreadThreshold","_useChatContext","useChatContext","_useImageGalleryConte","useImageGalleryContext","_useMessagesContext","useMessagesContext","_usePaginatedMessageL","usePaginatedMessageListContext","_useOverlayContext","useOverlayContext","_useThreadContext","useThreadContext","_useTranslationContex","useTranslationContext","t","exports"],"sources":["MessageList.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n FlatListProps,\n FlatList as FlatListType,\n Platform,\n ScrollViewProps,\n StyleSheet,\n View,\n ViewToken,\n} from 'react-native';\n\nimport {\n isMessageWithStylesReadByAndDateSeparator,\n MessageType,\n useMessageList,\n} from './hooks/useMessageList';\nimport { InlineLoadingMoreIndicator } from './InlineLoadingMoreIndicator';\nimport { InlineLoadingMoreRecentIndicator } from './InlineLoadingMoreRecentIndicator';\nimport { InlineLoadingMoreThreadIndicator } from './InlineLoadingMoreThreadIndicator';\nimport { getLastReceivedMessage } from './utils/getLastReceivedMessage';\n\nimport {\n AttachmentPickerContextValue,\n useAttachmentPickerContext,\n} from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport {\n ChannelContextValue,\n useChannelContext,\n} from '../../contexts/channelContext/ChannelContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\nimport { useDebugContext } from '../../contexts/debugContext/DebugContext';\nimport {\n ImageGalleryContextValue,\n useImageGalleryContext,\n} from '../../contexts/imageGalleryContext/ImageGalleryContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport {\n OverlayContextValue,\n useOverlayContext,\n} from '../../contexts/overlayContext/OverlayContext';\nimport {\n PaginatedMessageListContextValue,\n usePaginatedMessageListContext,\n} from '../../contexts/paginatedMessageListContext/PaginatedMessageListContext';\nimport { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';\nimport {\n isDayOrMoment,\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT = 150;\nconst MAX_RETRIES_AFTER_SCROLL_FAILURE = 10;\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flex: 1,\n width: '100%',\n },\n contentContainer: {\n flexGrow: 1,\n /**\n * paddingBottom is set to 4 to account for the default date\n * header and inline indicator alignment. The top margin is 8\n * on the header but 4 on the inline date, this adjusts the spacing\n * to allow the \"first\" inline date to align with the date header.\n */\n paddingBottom: 4,\n },\n flex: { flex: 1 },\n invert: { transform: [{ scaleY: -1 }] },\n invertAndroid: {\n // Invert the Y AND X axis to prevent a react native issue that can lead to ANRs on android 13\n // details: https://github.com/Expensify/App/pull/12820\n transform: [{ scaleX: -1 }, { scaleY: -1 }],\n },\n listContainer: {\n flex: 1,\n width: '100%',\n },\n stickyHeader: {\n position: 'absolute',\n top: 0,\n },\n});\n\nconst InvertedCellRendererComponent = (props: React.PropsWithChildren<unknown>) => (\n <View {...props} style={styles.invertAndroid} />\n);\n\nconst keyExtractor = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n item: MessageType<StreamChatGenerics>,\n) => {\n if (item.id) return item.id;\n if (item.created_at)\n return typeof item.created_at === 'string' ? item.created_at : item.created_at.toISOString();\n return Date.now().toString();\n};\n\nconst flatListViewabilityConfig = {\n viewAreaCoveragePercentThreshold: 1,\n};\n\ntype MessageListPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<AttachmentPickerContextValue, 'closePicker' | 'selectedPicker' | 'setSelectedPicker'> &\n Pick<\n ChannelContextValue<StreamChatGenerics>,\n | 'channel'\n | 'disabled'\n | 'EmptyStateIndicator'\n | 'hideStickyDateHeader'\n | 'loadChannelAroundMessage'\n | 'loading'\n | 'LoadingIndicator'\n | 'markRead'\n | 'NetworkDownIndicator'\n | 'reloadChannel'\n | 'scrollToFirstUnreadThreshold'\n | 'setTargetedMessage'\n | 'StickyHeader'\n | 'targetedMessage'\n > &\n Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setMessages'> &\n Pick<\n PaginatedMessageListContextValue<StreamChatGenerics>,\n 'hasNoMoreRecentMessagesToLoad' | 'loadMore' | 'loadMoreRecent'\n > &\n Pick<OverlayContextValue, 'overlay'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n | 'DateHeader'\n | 'disableTypingIndicator'\n | 'FlatList'\n | 'initialScrollToFirstUnreadMessage'\n | 'InlineDateSeparator'\n | 'InlineUnreadIndicator'\n | 'legacyImageViewerSwipeBehaviour'\n | 'Message'\n | 'ScrollToBottomButton'\n | 'MessageSystem'\n | 'myMessageTheme'\n | 'TypingIndicator'\n | 'TypingIndicatorContainer'\n > &\n Pick<ThreadContextValue<StreamChatGenerics>, 'loadMoreThread' | 'thread'> &\n Pick<TranslationContextValue, 't' | 'tDateTimeParser'> & {\n /**\n * Besides existing (default) UX behavior of underlying FlatList of MessageList component, if you want\n * to attach some additional props to underlying FlatList, you can add it to following prop.\n *\n * You can find list of all the available FlatList props here - https://facebook.github.io/react-native/docs/flatlist#props\n *\n * **NOTE** Don't use `additionalFlatListProps` to get access to ref of flatlist. Use `setFlatListRef` instead.\n *\n * e.g.\n * ```js\n * <MessageList\n * additionalFlatListProps={{ bounces: true, keyboardDismissMode: true }} />\n * ```\n */\n additionalFlatListProps?: Partial<FlatListProps<MessageType<StreamChatGenerics>>>;\n /**\n * UI component for footer of message list. By default message list will use `InlineLoadingMoreIndicator`\n * as FooterComponent. If you want to implement your own inline loading indicator, you can access `loadingMore`\n * from context.\n *\n * This is a [ListHeaderComponent](https://facebook.github.io/react-native/docs/flatlist#listheadercomponent) of FlatList\n * used in MessageList. Should be used for header by default if inverted is true or defaulted\n */\n FooterComponent?: React.ComponentType;\n /**\n * UI component for header of message list. By default message list will use `InlineLoadingMoreRecentIndicator`\n * as HeaderComponent. If you want to implement your own inline loading indicator, you can access `loadingMoreRecent`\n * from context.\n *\n * This is a [ListFooterComponent](https://facebook.github.io/react-native/docs/flatlist#listheadercomponent) of FlatList\n * used in MessageList. Should be used for header if inverted is false\n */\n HeaderComponent?: React.ComponentType;\n /** Whether or not the FlatList is inverted. Defaults to true */\n inverted?: boolean;\n isListActive?: boolean;\n /** Turn off grouping of messages by user */\n noGroupByUser?: boolean;\n onListScroll?: ScrollViewProps['onScroll'];\n /**\n * Handler to open the thread on message. This is callback for touch event for replies button.\n *\n * @param message A message object to open the thread upon.\n */\n onThreadSelect?: (message: ThreadContextValue<StreamChatGenerics>['thread']) => void;\n /**\n * Use `setFlatListRef` to get access to ref to inner FlatList.\n *\n * e.g.\n * ```js\n * <MessageList\n * setFlatListRef={(ref) => {\n * // Use ref for your own good\n * }}\n * ```\n */\n setFlatListRef?: (ref: FlatListType<MessageType<StreamChatGenerics>> | null) => void;\n /**\n * Boolean whether or not the Messages in the MessageList are part of a Thread\n **/\n threadList?: boolean;\n };\n\n/**\n * The message list component renders a list of messages. It consumes the following contexts:\n *\n * [ChannelContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/channel-context/)\n * [ChatContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/chat-context/)\n * [MessagesContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/)\n * [ThreadContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/thread-context/)\n * [TranslationContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/translation-context/)\n */\nconst MessageListWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageListPropsWithContext<StreamChatGenerics>,\n) => {\n const LoadingMoreIndicator = props.threadList\n ? InlineLoadingMoreThreadIndicator\n : InlineLoadingMoreIndicator;\n const {\n additionalFlatListProps,\n channel,\n client,\n closePicker,\n DateHeader,\n disabled,\n disableTypingIndicator,\n EmptyStateIndicator,\n FlatList,\n FooterComponent = LoadingMoreIndicator,\n hasNoMoreRecentMessagesToLoad,\n HeaderComponent = InlineLoadingMoreRecentIndicator,\n hideStickyDateHeader,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n inverted = true,\n isListActive = false,\n legacyImageViewerSwipeBehaviour,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n loadMore,\n loadMoreRecent,\n loadMoreThread,\n markRead,\n Message,\n MessageSystem,\n myMessageTheme,\n NetworkDownIndicator,\n noGroupByUser,\n onListScroll,\n onThreadSelect,\n overlay,\n reloadChannel,\n ScrollToBottomButton,\n selectedPicker,\n setFlatListRef,\n setMessages,\n setSelectedPicker,\n setTargetedMessage,\n StickyHeader,\n targetedMessage,\n tDateTimeParser,\n thread,\n threadList = false,\n TypingIndicator,\n TypingIndicatorContainer,\n } = props;\n\n const { theme } = useTheme();\n\n const {\n colors: { white_snow },\n messageList: { container, contentContainer, listContainer, messageContainer },\n screenPadding,\n } = theme;\n\n const modifiedTheme = useMemo(\n () => mergeThemes({ style: myMessageTheme, theme }),\n [myMessageTheme, theme],\n );\n\n const messageList = useMessageList<StreamChatGenerics>({\n noGroupByUser,\n threadList,\n });\n const messageListLengthBeforeUpdate = useRef(0);\n const messageListLengthAfterUpdate = messageList.length;\n\n /**\n * We need topMessage and channelLastRead values to set the initial scroll position.\n * So these values only get used if `initialScrollToFirstUnreadMessage` prop is true.\n */\n const topMessageBeforeUpdate = useRef<MessageType<StreamChatGenerics>>();\n const topMessageAfterUpdate = messageList[messageList.length - 1];\n\n const [autoscrollToTop, setAutoscrollToTop] = useState(false);\n\n /**\n * We want to call onEndReached and onStartReached only once, per content length.\n * We keep track of calls to these functions per content length, with following trackers.\n */\n const onStartReachedTracker = useRef<Record<number, boolean>>({});\n const onEndReachedTracker = useRef<Record<number, boolean>>({});\n\n const onStartReachedInPromise = useRef<Promise<void> | null>(null);\n const onEndReachedInPromise = useRef<Promise<void> | null>(null);\n\n const flatListRef = useRef<FlatListType<MessageType<StreamChatGenerics>> | null>(null);\n\n /**\n * Flag to track if the initial scroll has been set\n * If the prop `initialScrollToFirstUnreadMessage` was enabled, then we scroll to the unread msg and set it to true\n * If not, the default offset of 0 for flatList means that it has been set already\n */\n const [isInitialScrollDone, setInitialScrollDone] = useState(!initialScrollToFirstUnreadMessage);\n const channelResyncScrollSet = useRef<boolean>(true);\n\n /**\n * The timeout id used to debounce our scrollToIndex calls on messageList updates\n */\n const scrollToDebounceTimeoutRef = useRef<NodeJS.Timeout>();\n\n /**\n * The timeout id used to lazier load the initial scroll set flag\n */\n const initialScrollSettingTimeoutRef = useRef<NodeJS.Timeout>();\n\n /**\n * If a messageId was requested to scroll to but was unloaded,\n * this flag keeps track of it to scroll to it after loading the message\n */\n const messageIdToScrollToRef = useRef<string>();\n /**\n * Last messageID that was scrolled to after loading a new message list,\n * this flag keeps track of it so that we dont scroll to it again on target message set\n */\n const messageIdLastScrolledToRef = useRef<string>();\n const [hasMoved, setHasMoved] = useState(false);\n const [lastReceivedId, setLastReceivedId] = useState(getLastReceivedMessage(messageList)?.id);\n const [scrollToBottomButtonVisible, setScrollToBottomButtonVisible] = useState(false);\n\n const [stickyHeaderDate, setStickyHeaderDate] = useState<Date | undefined>();\n const stickyHeaderDateRef = useRef<Date | undefined>();\n\n // ref for channel to use in useEffect without triggering it on channel change\n const channelRef = useRef(channel);\n channelRef.current = channel;\n\n const updateStickyHeaderDateIfNeeded = (viewableItems: ViewToken[]) => {\n if (viewableItems.length) {\n const lastItem = viewableItems.pop() as {\n item: MessageType<StreamChatGenerics>;\n };\n\n const isMessageTypeDeleted = lastItem.item.type === 'deleted';\n\n if (\n lastItem?.item?.created_at &&\n !isMessageTypeDeleted &&\n typeof lastItem.item.created_at !== 'string' &&\n lastItem.item.created_at.toDateString() !== stickyHeaderDateRef.current?.toDateString()\n ) {\n stickyHeaderDateRef.current = lastItem.item.created_at;\n setStickyHeaderDate(lastItem.item.created_at);\n }\n }\n };\n\n /**\n * FlatList doesn't accept changeable function for onViewableItemsChanged prop.\n * Thus useRef.\n */\n const onViewableItemsChanged = useRef(\n ({ viewableItems }: { viewableItems: ViewToken[] | undefined }) => {\n /**\n * When a new message comes in, list scrolls down to the bottom automatically (using prop `maintainVisibleContentPosition`)\n * and we mark the channel as read from handleScroll function.\n * Although this logic is dependent on the fact that `onScroll` event gets triggered during this process.\n * But for Android, this event is not triggered when messages length is lesser than visible screen height.\n *\n * And thus we need to check if the message list length is lesser than visible screen height and mark the channel as read.\n */\n if (\n Platform.OS === 'android' &&\n viewableItems?.length &&\n viewableItems?.length >= messageListLengthBeforeUpdate.current\n ) {\n channel.markRead();\n }\n\n if (viewableItems && !hideStickyDateHeader) {\n updateStickyHeaderDateIfNeeded(viewableItems);\n }\n },\n );\n\n /**\n * Resets the pagination trackers, doing so cancels currently scheduled loading more calls\n */\n const resetPaginationTrackersRef = useRef(() => {\n onStartReachedTracker.current = {};\n onEndReachedTracker.current = {};\n });\n\n useEffect(() => {\n setScrollToBottomButtonVisible(false);\n }, [disabled]);\n\n useEffect(() => {\n const getShouldMarkReadAutomatically = (): boolean => {\n if (loading || !channel) {\n // nothing to do\n return false;\n } else if (channel.countUnread() > 0) {\n if (!initialScrollToFirstUnreadMessage) {\n /*\n * In this case MessageList won't scroll to first unread message when opened, so we can mark\n * the channel as read right after opening.\n * */\n return true;\n } else {\n /*\n * In this case MessageList will be opened to first unread message.\n * But if there are were not enough unread messages, so that scrollToBottom button was not shown\n * then MessageList won't need to scroll up. So we can safely mark the channel as read right after opening.\n *\n * NOTE: we must ensure that initial scroll is done, otherwise we do not wait till the unread scroll is finished\n * */\n if (scrollToBottomButtonVisible) return false;\n /* if scrollToBottom button was not visible, wait till\n * - initial scroll is done (indicates that if scrolling to index was needed it was triggered)\n * */\n return isInitialScrollDone;\n }\n }\n return false;\n };\n\n if (getShouldMarkReadAutomatically()) {\n markRead();\n }\n }, [loading, scrollToBottomButtonVisible, isInitialScrollDone]);\n\n useEffect(() => {\n const lastReceivedMessage = getLastReceivedMessage(messageList);\n\n const hasNewMessage = lastReceivedId !== lastReceivedMessage?.id;\n const isMyMessage = lastReceivedMessage?.user?.id === client.userID;\n\n setLastReceivedId(lastReceivedMessage?.id);\n\n /**\n * Scroll down when\n * 1. you send a new message to channel\n * 2. new message list is small than the one before update - channel has resynced\n * 3. created_at timestamp of top message before update is lesser than created_at timestamp of top message after update - channel has resynced\n */\n const scrollToBottomIfNeeded = () => {\n if (!client || !channel || messageList.length === 0) {\n return;\n }\n if (\n (hasNewMessage && isMyMessage) ||\n messageListLengthAfterUpdate < messageListLengthBeforeUpdate.current ||\n (topMessageBeforeUpdate.current?.created_at &&\n topMessageAfterUpdate?.created_at &&\n topMessageBeforeUpdate.current.created_at < topMessageAfterUpdate.created_at)\n ) {\n channelResyncScrollSet.current = false;\n setScrollToBottomButtonVisible(false);\n resetPaginationTrackersRef.current();\n\n setTimeout(() => {\n flatListRef.current?.scrollToOffset({\n offset: 0,\n });\n }, 50);\n setTimeout(() => {\n channelResyncScrollSet.current = true;\n if (channel.countUnread() > 0) {\n markRead();\n }\n }, 500);\n }\n };\n\n if (threadList || hasNoMoreRecentMessagesToLoad) {\n scrollToBottomIfNeeded();\n } else {\n setScrollToBottomButtonVisible(true);\n }\n\n if (\n !hasNoMoreRecentMessagesToLoad &&\n flatListRef.current &&\n messageListLengthBeforeUpdate.current === 0 &&\n messageListLengthAfterUpdate < 10\n ) {\n /**\n * Trigger onStartReached on first load, if messages are not enough to fill the screen.\n * This is important especially for android, where you can't overscroll.\n */\n maybeCallOnStartReached(10);\n }\n\n messageListLengthBeforeUpdate.current = messageListLengthAfterUpdate;\n topMessageBeforeUpdate.current = topMessageAfterUpdate;\n }, [hasNoMoreRecentMessagesToLoad, messageListLengthAfterUpdate, topMessageAfterUpdate?.id]);\n\n useEffect(() => {\n setAutoscrollToTop(hasNoMoreRecentMessagesToLoad);\n }, [messageList, hasNoMoreRecentMessagesToLoad]);\n\n const shouldApplyAndroidWorkaround = inverted && Platform.OS === 'android';\n\n const renderItem = ({\n index,\n item: message,\n }: {\n index: number;\n item: MessageType<StreamChatGenerics>;\n }) => {\n if (!channel || channel.disconnected || (!channel.initialized && !channel.offlineMode))\n return null;\n\n const lastRead = channel.lastRead();\n\n function isMessageUnread(messageArrayIndex: number): boolean {\n const msg = messageList?.[messageArrayIndex];\n if (lastRead && msg?.created_at) {\n return lastRead < msg.created_at;\n }\n return false;\n }\n\n const isCurrentMessageUnread = isMessageUnread(index);\n const showUnreadUnderlay =\n !channel.muteStatus().muted && isCurrentMessageUnread && scrollToBottomButtonVisible;\n const insertInlineUnreadIndicator = showUnreadUnderlay && !isMessageUnread(index + 1); // show only if previous message is read\n\n if (message.type === 'system') {\n return (\n <>\n <View testID={`message-list-item-${index}`}>\n <MessageSystem\n message={message}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n />\n </View>\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n );\n }\n\n const wrapMessageInTheme = client.userID === message.user?.id && !!myMessageTheme;\n return wrapMessageInTheme ? (\n <>\n {shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n <ThemeProvider mergedStyle={modifiedTheme}>\n <View testID={`message-list-item-${index}`}>\n <Message\n goToMessage={goToMessage}\n groupStyles={\n isMessageWithStylesReadByAndDateSeparator(message) ? message.groupStyles : []\n }\n isTargetedMessage={targetedMessage === message.id}\n lastReceivedId={lastReceivedId === message.id ? lastReceivedId : undefined}\n message={message}\n onThreadSelect={onThreadSelect}\n showUnreadUnderlay={showUnreadUnderlay}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n threadList={threadList}\n />\n </View>\n </ThemeProvider>\n {!shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n {/* Adding indicator below the messages, since the list is inverted */}\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n ) : (\n <>\n <View testID={`message-list-item-${index}`}>\n {shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n <Message\n goToMessage={goToMessage}\n groupStyles={\n isMessageWithStylesReadByAndDateSeparator(message) ? message.groupStyles : []\n }\n isTargetedMessage={targetedMessage === message.id}\n lastReceivedId={\n lastReceivedId === message.id || message.quoted_message_id\n ? lastReceivedId\n : undefined\n }\n message={message}\n onThreadSelect={onThreadSelect}\n showUnreadUnderlay={showUnreadUnderlay}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n threadList={threadList}\n />\n </View>\n {!shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n {/* Adding indicator below the messages, since the list is inverted */}\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n );\n };\n\n /**\n * We are keeping full control on message pagination, and not relying on react-native for it.\n * The reasons being,\n * 1. FlatList doesn't support onStartReached prop\n * 2. `onEndReached` function prop available on react-native, gets executed\n * once per content length (and thats actually a nice optimization strategy).\n * But it also means, we always need to prioritize onEndReached above our\n * logic for `onStartReached`.\n * 3. `onEndReachedThreshold` prop decides - at which scroll position to call `onEndReached`.\n * Its a factor of content length (which is necessary for \"real\" infinite scroll). But on\n * the other hand, it also makes calls to `onEndReached` (and this `channel.query`) way\n * too early during scroll, which we don't really need. So we are going to instead\n * keep some fixed offset distance, to decide when to call `loadMore` or `loadMoreRecent`.\n *\n * We are still gonna keep the optimization, which react-native does - only call onEndReached\n * once per content length.\n */\n\n /**\n * 1. Makes a call to `loadMoreRecent` function, which queries more recent messages.\n * 2. Ensures that we call `loadMoreRecent`, once per content length\n * 3. If the call to `loadMore` is in progress, we wait for it to finish to make sure scroll doesn't jump.\n */\n const maybeCallOnStartReached = async (limit?: number) => {\n // If onStartReached has already been called for given data length, then ignore.\n if (messageList?.length && onStartReachedTracker.current[messageList.length]) {\n return;\n }\n\n if (messageList?.length) {\n onStartReachedTracker.current[messageList.length] = true;\n }\n\n const callback = () => {\n onStartReachedInPromise.current = null;\n\n return Promise.resolve();\n };\n\n const onError = () => {\n /** Release the onStartReached trigger after 2 seconds, to try again */\n setTimeout(() => {\n onStartReachedTracker.current = {};\n }, 2000);\n };\n\n // If onEndReached is in progress, better to wait for it to finish for smooth UX\n if (onEndReachedInPromise.current) {\n await onEndReachedInPromise.current;\n onStartReachedInPromise.current = loadMoreRecent(limit).then(callback).catch(onError);\n } else {\n onStartReachedInPromise.current = loadMoreRecent(limit).then(callback).catch(onError);\n }\n };\n\n /**\n * 1. Makes a call to `loadMore` function, which queries more older messages.\n * 2. Ensures that we call `loadMore`, once per content length\n * 3. If the call to `loadMoreRecent` is in progress, we wait for it to finish to make sure scroll doesn't jump.\n */\n const maybeCallOnEndReached = async () => {\n // If onEndReached has already been called for given messageList length, then ignore.\n if (messageList?.length && onEndReachedTracker.current[messageList.length]) {\n return;\n }\n\n if (messageList?.length) {\n onEndReachedTracker.current[messageList.length] = true;\n }\n\n const callback = () => {\n onEndReachedInPromise.current = null;\n return Promise.resolve();\n };\n\n const onError = () => {\n /** Release the onEndReachedTracker trigger after 2 seconds, to try again */\n setTimeout(() => {\n onEndReachedTracker.current = {};\n }, 2000);\n };\n\n // If onStartReached is in progress, better to wait for it to finish for smooth UX\n if (onStartReachedInPromise.current) {\n await onStartReachedInPromise.current;\n onEndReachedInPromise.current = (threadList ? loadMoreThread() : loadMore())\n .then(callback)\n .catch(onError);\n } else {\n onEndReachedInPromise.current = (threadList ? loadMoreThread() : loadMore())\n .then(callback)\n .catch(onError);\n }\n };\n\n /**\n * Method used only inside the List to do these things\n * 1. Mark channel as read if scroll is at the bottom\n * 2. Call maybeCallOnStartReached if scroll is at the top\n * 3. Call maybeCallOnEndReached if scroll is at the bottom\n * 4. Show scrollToBottom button if scroll is at the bottom and messages are not the latest\n */\n const onScrollEvent: ScrollViewProps['onScroll'] = (event) => {\n if (!channel || !channelResyncScrollSet.current) {\n return;\n }\n\n const offset = event.nativeEvent.contentOffset.y;\n const visibleLength = event.nativeEvent.layoutMeasurement.height;\n const contentLength = event.nativeEvent.contentSize.height;\n // Check if scroll has reached either start of end of list.\n const isScrollAtStart = offset < 100;\n const isScrollAtEnd = contentLength - visibleLength - offset < 100;\n\n if (isScrollAtStart) {\n maybeCallOnStartReached();\n }\n\n if (isScrollAtEnd) {\n maybeCallOnEndReached();\n }\n\n // Show scrollToBottom button once scroll position goes beyond 150.\n const isScrollAtBottom = offset <= 150;\n\n /**\n * Following if condition covers following cases:\n * 1. If I scroll up -> show scrollToBottom button.\n * 2. If I scroll to bottom of screen\n * |-> hide scrollToBottom button.\n * |-> if channel is unread, call markRead().\n */\n\n const showScrollToBottomButton = !isScrollAtBottom || !hasNoMoreRecentMessagesToLoad;\n\n const shouldMarkRead =\n !threadList && offset <= 0 && hasNoMoreRecentMessagesToLoad && channel.countUnread() > 0;\n\n if (shouldMarkRead) {\n markRead();\n }\n\n setScrollToBottomButtonVisible(showScrollToBottomButton);\n };\n\n const handleScroll: ScrollViewProps['onScroll'] = (event) => {\n onScrollEvent(event);\n\n if (onListScroll) {\n onListScroll(event);\n }\n };\n\n const goToNewMessages = async () => {\n if (!hasNoMoreRecentMessagesToLoad) {\n resetPaginationTrackersRef.current();\n await reloadChannel();\n } else if (flatListRef.current) {\n flatListRef.current.scrollToOffset({\n offset: 0,\n });\n }\n\n setScrollToBottomButtonVisible(false);\n if (!threadList) {\n markRead();\n }\n };\n\n const scrollToIndexFailedRetryCountRef = useRef<number>(0);\n const failScrollTimeoutId = useRef<NodeJS.Timeout>();\n const onScrollToIndexFailedRef = useRef<\n FlatListProps<MessageType<StreamChatGenerics>>['onScrollToIndexFailed']\n >((info) => {\n // We got a failure as we tried to scroll to an item that was outside the render length\n if (!flatListRef.current) return;\n // we don't know the actual size of all items but we can see the average, so scroll to the closest offset\n flatListRef.current.scrollToOffset({\n animated: false,\n offset: info.averageItemLength * info.index,\n });\n const targetAgain = () => {\n // in case the target message was cleared out\n // the state being set again will trigger the highlight again\n if (messageIdLastScrolledToRef.current) {\n setTargetedMessage(messageIdLastScrolledToRef.current);\n }\n };\n targetAgain();\n // since we used only an average offset... we won't go to the center of the item yet\n // with a little delay to wait for scroll to offset to complete, we can then scroll to the index\n failScrollTimeoutId.current = setTimeout(() => {\n try {\n flatListRef.current?.scrollToIndex({\n animated: false,\n index: info.index,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n targetAgain();\n scrollToIndexFailedRetryCountRef.current = 0;\n } catch (e) {\n if (\n !onScrollToIndexFailedRef.current ||\n scrollToIndexFailedRetryCountRef.current > MAX_RETRIES_AFTER_SCROLL_FAILURE\n ) {\n console.log(\n `Scrolling to index failed after ${MAX_RETRIES_AFTER_SCROLL_FAILURE} retries`,\n e,\n );\n scrollToIndexFailedRetryCountRef.current = 0;\n return;\n }\n // At some cases the index we're trying to scroll to, doesn't exist yet in the messageList\n // Scrolling to an index not in range of the Flatlist's data will result in a crash that\n // won't call onScrollToIndexFailed.\n // By catching this error we retry scrolling by calling onScrollToIndexFailedRef\n scrollToIndexFailedRetryCountRef.current += 1;\n onScrollToIndexFailedRef.current(info);\n }\n }, WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT);\n\n // Only when index is greater than 0 and in range of items in FlatList\n // this onScrollToIndexFailed will be called again\n });\n\n const goToMessage = useCallback(\n (messageId: string) => {\n const indexOfParentInMessageList = messageList.findIndex(\n (message) => message?.id === messageId,\n );\n if (indexOfParentInMessageList !== -1 && flatListRef.current) {\n clearTimeout(failScrollTimeoutId.current);\n scrollToIndexFailedRetryCountRef.current = 0;\n flatListRef.current.scrollToIndex({\n animated: true,\n index: indexOfParentInMessageList,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n // keep track of this messageId, so that we dont scroll to again in useEffect for targeted message change\n messageIdLastScrolledToRef.current = messageId;\n setTargetedMessage(messageId);\n return;\n }\n messageIdToScrollToRef.current = messageId; // keep track of the id to scroll afterwards\n loadChannelAroundMessage({ messageId }); // now try to load the message and whats around it\n resetPaginationTrackersRef.current();\n },\n [messageList],\n );\n\n /**\n * Check if a messageId needs to be scrolled to after list loads, and scroll to it\n * Note: This effect fires on every list change with a small debounce so that scrolling isnt abrupted by an immediate rerender\n */\n useEffect(() => {\n scrollToDebounceTimeoutRef.current = setTimeout(() => {\n if (initialScrollToFirstUnreadMessage) {\n initialScrollSettingTimeoutRef.current = setTimeout(() => {\n // small timeout to ensure that handleScroll is called after scrollToIndex to set this flag\n setInitialScrollDone(true);\n }, 500);\n }\n // goToMessage method might have requested to scroll to a message\n let messageIdToScroll: string | undefined = messageIdToScrollToRef.current;\n if (targetedMessage && messageIdLastScrolledToRef.current !== targetedMessage) {\n // if some messageId was targeted but not scrolledTo yet\n // we have scroll to there after loading completes\n messageIdToScroll = targetedMessage;\n }\n if (!messageIdToScroll) return;\n const indexOfParentInMessageList = messageList.findIndex(\n (message) => message?.id === messageIdToScroll,\n );\n if (indexOfParentInMessageList !== -1 && flatListRef.current) {\n // By a fresh scroll we should clear the retries for the previous failed scroll\n clearTimeout(failScrollTimeoutId.current);\n scrollToIndexFailedRetryCountRef.current = 0;\n flatListRef.current.scrollToIndex({\n animated: false,\n index: indexOfParentInMessageList,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n // reset the messageId tracker to not scroll to that again\n messageIdToScrollToRef.current = undefined;\n // keep track of this messageId, so that we dont scroll to again for targeted message change\n messageIdLastScrolledToRef.current = messageIdToScroll;\n }\n }, 150);\n }, [targetedMessage, initialScrollToFirstUnreadMessage, messageList]);\n\n const messagesWithImages =\n legacyImageViewerSwipeBehaviour &&\n messageList.filter((message) => {\n const isMessageTypeDeleted = message.type === 'deleted';\n if (!isMessageTypeDeleted && message.attachments) {\n return message.attachments.some(\n (attachment) =>\n attachment.type === 'image' &&\n !attachment.title_link &&\n !attachment.og_scrape_url &&\n (attachment.image_url || attachment.thumb_url),\n );\n }\n return false;\n });\n\n /**\n * This is for the useEffect to run again in the case that a message\n * gets edited with more or the same number of images\n */\n const imageString =\n legacyImageViewerSwipeBehaviour &&\n messagesWithImages &&\n messagesWithImages\n .map((message) =>\n message.attachments\n ?.map((attachment) => attachment.image_url || attachment.thumb_url || '')\n .join(),\n )\n .join();\n\n const numberOfMessagesWithImages =\n legacyImageViewerSwipeBehaviour && messagesWithImages && messagesWithImages.length;\n const threadExists = !!thread;\n\n useEffect(() => {\n if (\n legacyImageViewerSwipeBehaviour &&\n isListActive &&\n ((threadList && thread) || (!threadList && !thread))\n ) {\n setMessages(messagesWithImages as MessageType<StreamChatGenerics>[]);\n }\n }, [\n imageString,\n isListActive,\n legacyImageViewerSwipeBehaviour,\n numberOfMessagesWithImages,\n threadExists,\n threadList,\n ]);\n\n const stickyHeaderFormatDate =\n stickyHeaderDate?.getFullYear() === new Date().getFullYear() ? 'MMM D' : 'MMM D, YYYY';\n const tStickyHeaderDate =\n stickyHeaderDate && !hideStickyDateHeader ? tDateTimeParser(stickyHeaderDate) : null;\n\n const stickyHeaderDateString = useMemo(() => {\n if (tStickyHeaderDate === null || hideStickyDateHeader) return null;\n if (isDayOrMoment(tStickyHeaderDate)) return tStickyHeaderDate.format(stickyHeaderFormatDate);\n\n return new Date(tStickyHeaderDate).toDateString();\n }, [tStickyHeaderDate, stickyHeaderFormatDate, hideStickyDateHeader]);\n\n const dismissImagePicker = () => {\n if (!hasMoved && selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n }\n };\n const onScrollBeginDrag: ScrollViewProps['onScrollBeginDrag'] = (event) => {\n !hasMoved && selectedPicker && setHasMoved(true);\n onScrollEvent(event);\n };\n const onScrollEndDrag: ScrollViewProps['onScrollEndDrag'] = (event) => {\n hasMoved && selectedPicker && setHasMoved(false);\n onScrollEvent(event);\n };\n\n const refCallback = (ref: FlatListType<MessageType<StreamChatGenerics>>) => {\n flatListRef.current = ref;\n\n if (setFlatListRef) {\n setFlatListRef(ref);\n }\n };\n\n const debugRef = useDebugContext();\n\n const isDebugModeEnabled = __DEV__ && debugRef && debugRef.current;\n\n if (isDebugModeEnabled) {\n if (debugRef.current.setEventType) debugRef.current.setEventType('send');\n if (debugRef.current.setSendEventParams)\n debugRef.current.setSendEventParams({\n action: thread ? 'ThreadList' : 'Messages',\n data: messageList,\n });\n }\n\n const renderListEmptyComponent = useCallback(\n () => (\n <View\n style={[styles.flex, shouldApplyAndroidWorkaround ? styles.invertAndroid : styles.invert]}\n testID='empty-state'\n >\n <EmptyStateIndicator listType='message' />\n </View>\n ),\n [EmptyStateIndicator, shouldApplyAndroidWorkaround],\n );\n\n const ListFooterComponent = useCallback(\n () => (\n <View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>\n <FooterComponent />\n </View>\n ),\n [shouldApplyAndroidWorkaround, FooterComponent],\n );\n\n const ListHeaderComponent = useCallback(\n () => (\n <View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>\n <HeaderComponent />\n </View>\n ),\n [shouldApplyAndroidWorkaround, HeaderComponent],\n );\n\n if (!FlatList) return null;\n\n if (loading) {\n return (\n <View style={styles.flex}>\n <LoadingIndicator listType='message' />\n </View>\n );\n }\n\n const StickyHeaderComponent = () => {\n if (!stickyHeaderDateString) return null;\n if (StickyHeader) return <StickyHeader dateString={stickyHeaderDateString} />;\n if (messageListLengthAfterUpdate) return <DateHeader dateString={stickyHeaderDateString} />;\n return null;\n };\n\n // We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading\n let additionalFlatListPropsExcludingStyle:\n | Omit<NonNullable<typeof additionalFlatListProps>, 'style' | 'contentContainerStyle'>\n | undefined;\n\n if (additionalFlatListProps) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { contentContainerStyle, style, ...rest } = additionalFlatListProps;\n additionalFlatListPropsExcludingStyle = rest;\n }\n\n return (\n <View\n style={[styles.container, { backgroundColor: white_snow }, container]}\n testID='message-flat-list-wrapper'\n >\n <FlatList\n CellRendererComponent={\n shouldApplyAndroidWorkaround ? InvertedCellRendererComponent : undefined\n }\n contentContainerStyle={[\n styles.contentContainer,\n additionalFlatListProps?.contentContainerStyle,\n contentContainer,\n ]}\n data={messageList}\n /** Disables the MessageList UI. Which means, message actions, reactions won't work. */\n extraData={disabled || !hasNoMoreRecentMessagesToLoad}\n inverted={shouldApplyAndroidWorkaround ? false : inverted}\n keyboardShouldPersistTaps='handled'\n keyExtractor={keyExtractor}\n ListEmptyComponent={renderListEmptyComponent}\n ListFooterComponent={ListFooterComponent}\n ListHeaderComponent={ListHeaderComponent}\n maintainVisibleContentPosition={{\n autoscrollToTopThreshold: autoscrollToTop ? 10 : undefined,\n minIndexForVisible: 1,\n }}\n maxToRenderPerBatch={30}\n onScroll={handleScroll}\n onScrollBeginDrag={onScrollBeginDrag}\n onScrollEndDrag={onScrollEndDrag}\n onScrollToIndexFailed={onScrollToIndexFailedRef.current}\n onTouchEnd={dismissImagePicker}\n onViewableItemsChanged={onViewableItemsChanged.current}\n ref={refCallback}\n renderItem={renderItem}\n scrollEnabled={overlay === 'none'}\n showsVerticalScrollIndicator={!shouldApplyAndroidWorkaround}\n style={[\n styles.listContainer,\n listContainer,\n additionalFlatListProps?.style,\n shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined,\n ]}\n testID='message-flat-list'\n viewabilityConfig={flatListViewabilityConfig}\n {...additionalFlatListPropsExcludingStyle}\n />\n {!loading && (\n <>\n <View style={styles.stickyHeader}>\n <StickyHeaderComponent />\n </View>\n {!disableTypingIndicator && TypingIndicator && (\n <TypingIndicatorContainer>\n <TypingIndicator />\n </TypingIndicatorContainer>\n )}\n <ScrollToBottomButton\n onPress={goToNewMessages}\n showNotification={scrollToBottomButtonVisible}\n unreadCount={threadList ? 0 : channel?.countUnread()}\n />\n </>\n )}\n <NetworkDownIndicator />\n </View>\n );\n};\n\nexport type MessageListProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<MessageListPropsWithContext<StreamChatGenerics>>;\n\nexport const MessageList = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageListProps<StreamChatGenerics>,\n) => {\n const { closePicker, selectedPicker, setSelectedPicker } = useAttachmentPickerContext();\n const {\n channel,\n disabled,\n EmptyStateIndicator,\n enableMessageGroupingByUser,\n error,\n hideStickyDateHeader,\n isChannelActive,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n markRead,\n NetworkDownIndicator,\n reloadChannel,\n scrollToFirstUnreadThreshold,\n setTargetedMessage,\n StickyHeader,\n targetedMessage,\n } = useChannelContext<StreamChatGenerics>();\n const { client } = useChatContext<StreamChatGenerics>();\n const { setMessages } = useImageGalleryContext<StreamChatGenerics>();\n const {\n DateHeader,\n disableTypingIndicator,\n FlatList,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n legacyImageViewerSwipeBehaviour,\n Message,\n MessageSystem,\n myMessageTheme,\n ScrollToBottomButton,\n TypingIndicator,\n TypingIndicatorContainer,\n } = useMessagesContext<StreamChatGenerics>();\n const { hasNoMoreRecentMessagesToLoad, loadMore, loadMoreRecent } =\n usePaginatedMessageListContext<StreamChatGenerics>();\n const { overlay } = useOverlayContext();\n const { loadMoreThread, thread } = useThreadContext<StreamChatGenerics>();\n const { t, tDateTimeParser } = useTranslationContext();\n\n return (\n <MessageListWithContext\n {...{\n channel,\n client,\n closePicker,\n DateHeader,\n disabled,\n disableTypingIndicator,\n EmptyStateIndicator,\n enableMessageGroupingByUser,\n error,\n FlatList,\n hasNoMoreRecentMessagesToLoad,\n hideStickyDateHeader,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n isListActive: isChannelActive,\n legacyImageViewerSwipeBehaviour,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n loadMore,\n loadMoreRecent,\n loadMoreThread,\n markRead,\n Message,\n MessageSystem,\n myMessageTheme,\n NetworkDownIndicator,\n overlay,\n reloadChannel,\n ScrollToBottomButton,\n scrollToFirstUnreadThreshold,\n selectedPicker,\n setMessages,\n setSelectedPicker,\n setTargetedMessage,\n StickyHeader,\n t,\n targetedMessage,\n tDateTimeParser,\n thread,\n TypingIndicator,\n TypingIndicatorContainer,\n }}\n {...props}\n noGroupByUser={!enableMessageGroupingByUser || props.noGroupByUser}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,eAAA,GAAAF,OAAA;AAKA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA;AACA,IAAAK,iCAAA,GAAAL,OAAA;AACA,IAAAM,uBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AAIA,IAAAQ,eAAA,GAAAR,OAAA;AAIA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAIA,IAAAY,gBAAA,GAAAZ,OAAA;AAIA,IAAAa,eAAA,GAAAb,OAAA;AAIA,IAAAc,4BAAA,GAAAd,OAAA;AAIA,IAAAe,aAAA,GAAAf,OAAA;AACA,IAAAgB,cAAA,GAAAhB,OAAA;AACA,IAAAiB,mBAAA,GAAAjB,OAAA;AAI8D,IAAAkB,SAAA;AAAA,IAAAC,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAvB,wBAAA2B,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QA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C,cAAc,EAAdA,cAAc;IACdC,oBAAoB,EAApBA,oBAAoB;IACpBI,OAAO,EAAPA,OAAO;IACPC,aAAa,EAAbA,aAAa;IACbC,oBAAoB,EAApBA,oBAAoB;IACpB8Q,4BAA4B,EAA5BA,4BAA4B;IAC5B7Q,cAAc,EAAdA,cAAc;IACdE,WAAW,EAAXA,WAAW;IACXC,iBAAiB,EAAjBA,iBAAiB;IACjBC,kBAAkB,EAAlBA,kBAAkB;IAClBC,YAAY,EAAZA,YAAY;IACZuR,CAAC,EAADA,CAAC;IACDtR,eAAe,EAAfA,eAAe;IACfC,eAAe,EAAfA,eAAe;IACfC,MAAM,EAANA,MAAM;IACNE,eAAe,EAAfA,eAAe;IACfC,wBAAwB,EAAxBA;EAAwB,GAEtB9E,KAAK;IACT6D,aAAa,EAAE,CAACgR,2BAA2B,IAAI7U,KAAK,CAAC6D,aAAc;IAAAxD,MAAA,EAAAnD,KAAA;IAAAoD,QAAA;MAAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,EACpE,CAAC;AAEN,CAAC;AAACuV,OAAA,CAAAxB,WAAA,GAAAA,WAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useMessageList","_InlineLoadingMoreIndicator","_InlineLoadingMoreRecentIndicator","_InlineLoadingMoreThreadIndicator","_getLastReceivedMessage","_AttachmentPickerContext","_ChannelContext","_ChatContext","_DebugContext","_ImageGalleryContext","_MessagesContext","_OverlayContext","_PaginatedMessageListContext","_ThemeContext","_ThreadContext","_TranslationContext","_excluded","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT","MAX_RETRIES_AFTER_SCROLL_FAILURE","styles","StyleSheet","create","container","alignItems","flex","width","contentContainer","flexGrow","paddingBottom","invert","transform","scaleY","invertAndroid","scaleX","listContainer","stickyHeader","position","top","InvertedCellRendererComponent","props","createElement","View","_extends2","style","__self","__source","fileName","lineNumber","columnNumber","keyExtractor","item","id","created_at","toISOString","Date","now","toString","flatListViewabilityConfig","viewAreaCoveragePercentThreshold","MessageListWithContext","_getLastReceivedMessa","LoadingMoreIndicator","threadList","InlineLoadingMoreThreadIndicator","InlineLoadingMoreIndicator","additionalFlatListProps","channel","client","closePicker","DateHeader","disabled","disableTypingIndicator","EmptyStateIndicator","FlatList","_props$FooterComponen","FooterComponent","hasNoMoreRecentMessagesToLoad","_props$HeaderComponen","HeaderComponent","InlineLoadingMoreRecentIndicator","hideStickyDateHeader","initialScrollToFirstUnreadMessage","InlineDateSeparator","InlineUnreadIndicator","_props$inverted","inverted","_props$isListActive","isListActive","legacyImageViewerSwipeBehaviour","loadChannelAroundMessage","loading","LoadingIndicator","loadMore","loadMoreRecent","loadMoreThread","markRead","Message","MessageSystem","myMessageTheme","NetworkDownIndicator","noGroupByUser","onListScroll","onThreadSelect","overlay","reloadChannel","ScrollToBottomButton","selectedPicker","setFlatListRef","setMessages","setSelectedPicker","setTargetedMessage","StickyHeader","targetedMessage","tDateTimeParser","thread","_props$threadList","TypingIndicator","TypingIndicatorContainer","_useTheme","useTheme","theme","white_snow","colors","_theme$messageList","messageList","messageContainer","screenPadding","modifiedTheme","useMemo","mergeThemes","useMessageList","messageListLengthBeforeUpdate","useRef","messageListLengthAfterUpdate","length","topMessageBeforeUpdate","topMessageAfterUpdate","_useState","useState","_useState2","_slicedToArray2","autoscrollToTop","setAutoscrollToTop","onStartReachedTracker","onEndReachedTracker","onStartReachedInPromise","onEndReachedInPromise","flatListRef","_useState3","_useState4","isInitialScrollDone","setInitialScrollDone","channelResyncScrollSet","scrollToDebounceTimeoutRef","initialScrollSettingTimeoutRef","tempDisablePaginationTrackersTimeoutRef","messageIdToScrollToRef","messageIdLastScrolledToRef","_useState5","_useState6","hasMoved","setHasMoved","_useState7","getLastReceivedMessage","_useState8","lastReceivedId","setLastReceivedId","_useState9","_useState10","scrollToBottomButtonVisible","setScrollToBottomButtonVisible","_useState11","_useState12","stickyHeaderDate","setStickyHeaderDate","stickyHeaderDateRef","channelRef","current","updateStickyHeaderDateIfNeeded","viewableItems","_lastItem$item","_stickyHeaderDateRef$","lastItem","pop","isMessageTypeDeleted","type","toDateString","onViewableItemsChanged","_ref","Platform","OS","resetPaginationTrackersRef","tempDisablePaginationTrackersRef","messageListLength","clearTimeout","setTimeout","useEffect","getShouldMarkReadAutomatically","countUnread","_lastReceivedMessage$","lastReceivedMessage","hasNewMessage","isMyMessage","user","userID","scrollToBottomIfNeeded","_topMessageBeforeUpda","_flatListRef$current","scrollToOffset","offset","maybeCallOnStartReached","shouldApplyAndroidWorkaround","renderItem","_ref2","_message$user","index","message","disconnected","initialized","offlineMode","lastRead","isMessageUnread","messageArrayIndex","msg","isCurrentMessageUnread","showUnreadUnderlay","muteStatus","muted","insertInlineUnreadIndicator","Fragment","testID","paddingHorizontal","wrapMessageInTheme","isMessageWithStylesReadByAndDateSeparator","dateSeparator","date","ThemeProvider","mergedStyle","goToMessage","groupStyles","isTargetedMessage","undefined","quoted_message_id","_ref3","_asyncToGenerator2","_regenerator","mark","_callee","limit","callback","onError","wrap","_callee$","_context","prev","next","abrupt","Promise","resolve","then","stop","_x","apply","arguments","maybeCallOnEndReached","_ref4","_callee2","_callee2$","_context2","onScrollEvent","event","nativeEvent","contentOffset","y","visibleLength","layoutMeasurement","height","contentLength","contentSize","isScrollAtStart","isScrollAtEnd","isScrollAtBottom","showScrollToBottomButton","shouldMarkRead","handleScroll","goToNewMessages","_ref5","_callee3","_callee3$","_context3","scrollToIndexFailedRetryCountRef","failScrollTimeoutId","onScrollToIndexFailedRef","info","_flatListRef$current$","_flatListRef$current$2","dataLength","data","animated","averageItemLength","_flatListRef$current2","scrollToIndex","viewPosition","e","console","log","useCallback","messageId","indexOfParentInMessageList","findIndex","messageIdToScroll","messagesWithImages","filter","attachments","some","attachment","title_link","og_scrape_url","image_url","thumb_url","imageString","map","_message$attachments","join","numberOfMessagesWithImages","threadExists","stickyHeaderFormatDate","getFullYear","tStickyHeaderDate","stickyHeaderDateString","isDayOrMoment","format","dismissImagePicker","onScrollBeginDrag","onScrollEndDrag","refCallback","ref","debugRef","useDebugContext","isDebugModeEnabled","__DEV__","setEventType","setSendEventParams","action","renderListEmptyComponent","listType","ListFooterComponent","ListHeaderComponent","StickyHeaderComponent","dateString","additionalFlatListPropsExcludingStyle","contentContainerStyle","rest","_objectWithoutProperties2","backgroundColor","CellRendererComponent","extraData","keyboardShouldPersistTaps","ListEmptyComponent","maintainVisibleContentPosition","autoscrollToTopThreshold","minIndexForVisible","maxToRenderPerBatch","onScroll","onScrollToIndexFailed","onTouchEnd","scrollEnabled","showsVerticalScrollIndicator","viewabilityConfig","onPress","showNotification","unreadCount","MessageList","_useAttachmentPickerC","useAttachmentPickerContext","_useChannelContext","useChannelContext","enableMessageGroupingByUser","error","isChannelActive","scrollToFirstUnreadThreshold","_useChatContext","useChatContext","_useImageGalleryConte","useImageGalleryContext","_useMessagesContext","useMessagesContext","_usePaginatedMessageL","usePaginatedMessageListContext","_useOverlayContext","useOverlayContext","_useThreadContext","useThreadContext","_useTranslationContex","useTranslationContext","t","exports"],"sources":["MessageList.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n FlatListProps,\n FlatList as FlatListType,\n Platform,\n ScrollViewProps,\n StyleSheet,\n View,\n ViewToken,\n} from 'react-native';\n\nimport {\n isMessageWithStylesReadByAndDateSeparator,\n MessageType,\n useMessageList,\n} from './hooks/useMessageList';\nimport { InlineLoadingMoreIndicator } from './InlineLoadingMoreIndicator';\nimport { InlineLoadingMoreRecentIndicator } from './InlineLoadingMoreRecentIndicator';\nimport { InlineLoadingMoreThreadIndicator } from './InlineLoadingMoreThreadIndicator';\nimport { getLastReceivedMessage } from './utils/getLastReceivedMessage';\n\nimport {\n AttachmentPickerContextValue,\n useAttachmentPickerContext,\n} from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport {\n ChannelContextValue,\n useChannelContext,\n} from '../../contexts/channelContext/ChannelContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\nimport { useDebugContext } from '../../contexts/debugContext/DebugContext';\nimport {\n ImageGalleryContextValue,\n useImageGalleryContext,\n} from '../../contexts/imageGalleryContext/ImageGalleryContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport {\n OverlayContextValue,\n useOverlayContext,\n} from '../../contexts/overlayContext/OverlayContext';\nimport {\n PaginatedMessageListContextValue,\n usePaginatedMessageListContext,\n} from '../../contexts/paginatedMessageListContext/PaginatedMessageListContext';\nimport { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';\nimport {\n isDayOrMoment,\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT = 150;\nconst MAX_RETRIES_AFTER_SCROLL_FAILURE = 10;\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flex: 1,\n width: '100%',\n },\n contentContainer: {\n flexGrow: 1,\n /**\n * paddingBottom is set to 4 to account for the default date\n * header and inline indicator alignment. The top margin is 8\n * on the header but 4 on the inline date, this adjusts the spacing\n * to allow the \"first\" inline date to align with the date header.\n */\n paddingBottom: 4,\n },\n flex: { flex: 1 },\n invert: { transform: [{ scaleY: -1 }] },\n invertAndroid: {\n // Invert the Y AND X axis to prevent a react native issue that can lead to ANRs on android 13\n // details: https://github.com/Expensify/App/pull/12820\n transform: [{ scaleX: -1 }, { scaleY: -1 }],\n },\n listContainer: {\n flex: 1,\n width: '100%',\n },\n stickyHeader: {\n position: 'absolute',\n top: 0,\n },\n});\n\nconst InvertedCellRendererComponent = (props: React.PropsWithChildren<unknown>) => (\n <View {...props} style={styles.invertAndroid} />\n);\n\nconst keyExtractor = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n item: MessageType<StreamChatGenerics>,\n) => {\n if (item.id) return item.id;\n if (item.created_at)\n return typeof item.created_at === 'string' ? item.created_at : item.created_at.toISOString();\n return Date.now().toString();\n};\n\nconst flatListViewabilityConfig = {\n viewAreaCoveragePercentThreshold: 1,\n};\n\ntype MessageListPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<AttachmentPickerContextValue, 'closePicker' | 'selectedPicker' | 'setSelectedPicker'> &\n Pick<\n ChannelContextValue<StreamChatGenerics>,\n | 'channel'\n | 'disabled'\n | 'EmptyStateIndicator'\n | 'hideStickyDateHeader'\n | 'loadChannelAroundMessage'\n | 'loading'\n | 'LoadingIndicator'\n | 'markRead'\n | 'NetworkDownIndicator'\n | 'reloadChannel'\n | 'scrollToFirstUnreadThreshold'\n | 'setTargetedMessage'\n | 'StickyHeader'\n | 'targetedMessage'\n > &\n Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setMessages'> &\n Pick<\n PaginatedMessageListContextValue<StreamChatGenerics>,\n 'hasNoMoreRecentMessagesToLoad' | 'loadMore' | 'loadMoreRecent'\n > &\n Pick<OverlayContextValue, 'overlay'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n | 'DateHeader'\n | 'disableTypingIndicator'\n | 'FlatList'\n | 'initialScrollToFirstUnreadMessage'\n | 'InlineDateSeparator'\n | 'InlineUnreadIndicator'\n | 'legacyImageViewerSwipeBehaviour'\n | 'Message'\n | 'ScrollToBottomButton'\n | 'MessageSystem'\n | 'myMessageTheme'\n | 'TypingIndicator'\n | 'TypingIndicatorContainer'\n > &\n Pick<ThreadContextValue<StreamChatGenerics>, 'loadMoreThread' | 'thread'> &\n Pick<TranslationContextValue, 't' | 'tDateTimeParser'> & {\n /**\n * Besides existing (default) UX behavior of underlying FlatList of MessageList component, if you want\n * to attach some additional props to underlying FlatList, you can add it to following prop.\n *\n * You can find list of all the available FlatList props here - https://facebook.github.io/react-native/docs/flatlist#props\n *\n * **NOTE** Don't use `additionalFlatListProps` to get access to ref of flatlist. Use `setFlatListRef` instead.\n *\n * e.g.\n * ```js\n * <MessageList\n * additionalFlatListProps={{ bounces: true, keyboardDismissMode: true }} />\n * ```\n */\n additionalFlatListProps?: Partial<FlatListProps<MessageType<StreamChatGenerics>>>;\n /**\n * UI component for footer of message list. By default message list will use `InlineLoadingMoreIndicator`\n * as FooterComponent. If you want to implement your own inline loading indicator, you can access `loadingMore`\n * from context.\n *\n * This is a [ListHeaderComponent](https://facebook.github.io/react-native/docs/flatlist#listheadercomponent) of FlatList\n * used in MessageList. Should be used for header by default if inverted is true or defaulted\n */\n FooterComponent?: React.ComponentType;\n /**\n * UI component for header of message list. By default message list will use `InlineLoadingMoreRecentIndicator`\n * as HeaderComponent. If you want to implement your own inline loading indicator, you can access `loadingMoreRecent`\n * from context.\n *\n * This is a [ListFooterComponent](https://facebook.github.io/react-native/docs/flatlist#listheadercomponent) of FlatList\n * used in MessageList. Should be used for header if inverted is false\n */\n HeaderComponent?: React.ComponentType;\n /** Whether or not the FlatList is inverted. Defaults to true */\n inverted?: boolean;\n isListActive?: boolean;\n /** Turn off grouping of messages by user */\n noGroupByUser?: boolean;\n onListScroll?: ScrollViewProps['onScroll'];\n /**\n * Handler to open the thread on message. This is callback for touch event for replies button.\n *\n * @param message A message object to open the thread upon.\n */\n onThreadSelect?: (message: ThreadContextValue<StreamChatGenerics>['thread']) => void;\n /**\n * Use `setFlatListRef` to get access to ref to inner FlatList.\n *\n * e.g.\n * ```js\n * <MessageList\n * setFlatListRef={(ref) => {\n * // Use ref for your own good\n * }}\n * ```\n */\n setFlatListRef?: (ref: FlatListType<MessageType<StreamChatGenerics>> | null) => void;\n /**\n * Boolean whether or not the Messages in the MessageList are part of a Thread\n **/\n threadList?: boolean;\n };\n\n/**\n * The message list component renders a list of messages. It consumes the following contexts:\n *\n * [ChannelContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/channel-context/)\n * [ChatContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/chat-context/)\n * [MessagesContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/)\n * [ThreadContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/thread-context/)\n * [TranslationContext](https://getstream.io/chat/docs/sdk/reactnative/contexts/translation-context/)\n */\nconst MessageListWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageListPropsWithContext<StreamChatGenerics>,\n) => {\n const LoadingMoreIndicator = props.threadList\n ? InlineLoadingMoreThreadIndicator\n : InlineLoadingMoreIndicator;\n const {\n additionalFlatListProps,\n channel,\n client,\n closePicker,\n DateHeader,\n disabled,\n disableTypingIndicator,\n EmptyStateIndicator,\n FlatList,\n FooterComponent = LoadingMoreIndicator,\n hasNoMoreRecentMessagesToLoad,\n HeaderComponent = InlineLoadingMoreRecentIndicator,\n hideStickyDateHeader,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n inverted = true,\n isListActive = false,\n legacyImageViewerSwipeBehaviour,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n loadMore,\n loadMoreRecent,\n loadMoreThread,\n markRead,\n Message,\n MessageSystem,\n myMessageTheme,\n NetworkDownIndicator,\n noGroupByUser,\n onListScroll,\n onThreadSelect,\n overlay,\n reloadChannel,\n ScrollToBottomButton,\n selectedPicker,\n setFlatListRef,\n setMessages,\n setSelectedPicker,\n setTargetedMessage,\n StickyHeader,\n targetedMessage,\n tDateTimeParser,\n thread,\n threadList = false,\n TypingIndicator,\n TypingIndicatorContainer,\n } = props;\n\n const { theme } = useTheme();\n\n const {\n colors: { white_snow },\n messageList: { container, contentContainer, listContainer, messageContainer },\n screenPadding,\n } = theme;\n\n const modifiedTheme = useMemo(\n () => mergeThemes({ style: myMessageTheme, theme }),\n [myMessageTheme, theme],\n );\n\n const messageList = useMessageList<StreamChatGenerics>({\n noGroupByUser,\n threadList,\n });\n const messageListLengthBeforeUpdate = useRef(0);\n const messageListLengthAfterUpdate = messageList.length;\n\n /**\n * We need topMessage and channelLastRead values to set the initial scroll position.\n * So these values only get used if `initialScrollToFirstUnreadMessage` prop is true.\n */\n const topMessageBeforeUpdate = useRef<MessageType<StreamChatGenerics>>();\n const topMessageAfterUpdate = messageList[messageList.length - 1];\n\n const [autoscrollToTop, setAutoscrollToTop] = useState(false);\n\n /**\n * We want to call onEndReached and onStartReached only once, per content length.\n * We keep track of calls to these functions per content length, with following trackers.\n */\n const onStartReachedTracker = useRef<Record<number, boolean>>({});\n const onEndReachedTracker = useRef<Record<number, boolean>>({});\n\n const onStartReachedInPromise = useRef<Promise<void> | null>(null);\n const onEndReachedInPromise = useRef<Promise<void> | null>(null);\n\n const flatListRef = useRef<FlatListType<MessageType<StreamChatGenerics>> | null>(null);\n\n /**\n * Flag to track if the initial scroll has been set\n * If the prop `initialScrollToFirstUnreadMessage` was enabled, then we scroll to the unread msg and set it to true\n * If not, the default offset of 0 for flatList means that it has been set already\n */\n const [isInitialScrollDone, setInitialScrollDone] = useState(!initialScrollToFirstUnreadMessage);\n const channelResyncScrollSet = useRef<boolean>(true);\n\n /**\n * The timeout id used to debounce our scrollToIndex calls on messageList updates\n */\n const scrollToDebounceTimeoutRef = useRef<NodeJS.Timeout>();\n\n /**\n * The timeout id used to lazier load the initial scroll set flag\n */\n const initialScrollSettingTimeoutRef = useRef<NodeJS.Timeout>();\n\n /**\n * The timeout id used to temporarily load the initial scroll set flag\n */\n const tempDisablePaginationTrackersTimeoutRef = useRef<NodeJS.Timeout>();\n\n /**\n * If a messageId was requested to scroll to but was unloaded,\n * this flag keeps track of it to scroll to it after loading the message\n */\n const messageIdToScrollToRef = useRef<string>();\n /**\n * Last messageID that was scrolled to after loading a new message list,\n * this flag keeps track of it so that we dont scroll to it again on target message set\n */\n const messageIdLastScrolledToRef = useRef<string>();\n const [hasMoved, setHasMoved] = useState(false);\n const [lastReceivedId, setLastReceivedId] = useState(getLastReceivedMessage(messageList)?.id);\n const [scrollToBottomButtonVisible, setScrollToBottomButtonVisible] = useState(false);\n\n const [stickyHeaderDate, setStickyHeaderDate] = useState<Date | undefined>();\n const stickyHeaderDateRef = useRef<Date | undefined>();\n\n // ref for channel to use in useEffect without triggering it on channel change\n const channelRef = useRef(channel);\n channelRef.current = channel;\n\n const updateStickyHeaderDateIfNeeded = (viewableItems: ViewToken[]) => {\n if (viewableItems.length) {\n const lastItem = viewableItems.pop() as {\n item: MessageType<StreamChatGenerics>;\n };\n\n const isMessageTypeDeleted = lastItem.item.type === 'deleted';\n\n if (\n lastItem?.item?.created_at &&\n !isMessageTypeDeleted &&\n typeof lastItem.item.created_at !== 'string' &&\n lastItem.item.created_at.toDateString() !== stickyHeaderDateRef.current?.toDateString()\n ) {\n stickyHeaderDateRef.current = lastItem.item.created_at;\n setStickyHeaderDate(lastItem.item.created_at);\n }\n }\n };\n\n /**\n * FlatList doesn't accept changeable function for onViewableItemsChanged prop.\n * Thus useRef.\n */\n const onViewableItemsChanged = useRef(\n ({ viewableItems }: { viewableItems: ViewToken[] | undefined }) => {\n /**\n * When a new message comes in, list scrolls down to the bottom automatically (using prop `maintainVisibleContentPosition`)\n * and we mark the channel as read from handleScroll function.\n * Although this logic is dependent on the fact that `onScroll` event gets triggered during this process.\n * But for Android, this event is not triggered when messages length is lesser than visible screen height.\n *\n * And thus we need to check if the message list length is lesser than visible screen height and mark the channel as read.\n */\n if (\n Platform.OS === 'android' &&\n viewableItems?.length &&\n viewableItems?.length >= messageListLengthBeforeUpdate.current\n ) {\n channel.markRead();\n }\n\n if (viewableItems && !hideStickyDateHeader) {\n updateStickyHeaderDateIfNeeded(viewableItems);\n }\n },\n );\n\n /**\n * Resets the pagination trackers, doing so cancels currently scheduled loading more calls\n */\n const resetPaginationTrackersRef = useRef(() => {\n onStartReachedTracker.current = {};\n onEndReachedTracker.current = {};\n });\n\n /**\n * Disables the pagination trackers for a second\n * This is used to prevent the onEndReached and onStartReached from firing\n * when we scroll to the bottom or top of the list automatically without user interaction\n * Ex: for targeted message scroll\n */\n const tempDisablePaginationTrackersRef = useRef((messageListLength: number) => {\n clearTimeout(tempDisablePaginationTrackersTimeoutRef.current);\n onStartReachedTracker.current[messageListLength] = true;\n onEndReachedTracker.current[messageListLength] = true;\n tempDisablePaginationTrackersTimeoutRef.current = setTimeout(() => {\n onStartReachedTracker.current[messageListLength] = false;\n onEndReachedTracker.current[messageListLength] = false;\n }, 1000);\n });\n\n useEffect(() => {\n setScrollToBottomButtonVisible(false);\n }, [disabled]);\n\n useEffect(() => {\n const getShouldMarkReadAutomatically = (): boolean => {\n if (loading || !channel) {\n // nothing to do\n return false;\n } else if (channel.countUnread() > 0) {\n if (!initialScrollToFirstUnreadMessage) {\n /*\n * In this case MessageList won't scroll to first unread message when opened, so we can mark\n * the channel as read right after opening.\n * */\n return true;\n } else {\n /*\n * In this case MessageList will be opened to first unread message.\n * But if there are were not enough unread messages, so that scrollToBottom button was not shown\n * then MessageList won't need to scroll up. So we can safely mark the channel as read right after opening.\n *\n * NOTE: we must ensure that initial scroll is done, otherwise we do not wait till the unread scroll is finished\n * */\n if (scrollToBottomButtonVisible) return false;\n /* if scrollToBottom button was not visible, wait till\n * - initial scroll is done (indicates that if scrolling to index was needed it was triggered)\n * */\n return isInitialScrollDone;\n }\n }\n return false;\n };\n\n if (getShouldMarkReadAutomatically()) {\n markRead();\n }\n }, [loading, scrollToBottomButtonVisible, isInitialScrollDone]);\n\n useEffect(() => {\n const lastReceivedMessage = getLastReceivedMessage(messageList);\n\n const hasNewMessage = lastReceivedId !== lastReceivedMessage?.id;\n const isMyMessage = lastReceivedMessage?.user?.id === client.userID;\n\n setLastReceivedId(lastReceivedMessage?.id);\n\n /**\n * Scroll down when\n * 1. you send a new message to channel\n * 2. new message list is small than the one before update - channel has resynced\n * 3. created_at timestamp of top message before update is lesser than created_at timestamp of top message after update - channel has resynced\n */\n const scrollToBottomIfNeeded = () => {\n if (!client || !channel || messageList.length === 0) {\n return;\n }\n if (\n (hasNewMessage && isMyMessage) ||\n messageListLengthAfterUpdate < messageListLengthBeforeUpdate.current ||\n (topMessageBeforeUpdate.current?.created_at &&\n topMessageAfterUpdate?.created_at &&\n topMessageBeforeUpdate.current.created_at < topMessageAfterUpdate.created_at)\n ) {\n channelResyncScrollSet.current = false;\n setScrollToBottomButtonVisible(false);\n resetPaginationTrackersRef.current();\n\n setTimeout(() => {\n flatListRef.current?.scrollToOffset({\n offset: 0,\n });\n }, 50);\n setTimeout(() => {\n channelResyncScrollSet.current = true;\n if (channel.countUnread() > 0) {\n markRead();\n }\n }, 500);\n }\n };\n\n if (threadList || hasNoMoreRecentMessagesToLoad) {\n scrollToBottomIfNeeded();\n } else {\n setScrollToBottomButtonVisible(true);\n }\n\n if (\n !hasNoMoreRecentMessagesToLoad &&\n flatListRef.current &&\n messageListLengthBeforeUpdate.current === 0 &&\n messageListLengthAfterUpdate < 10\n ) {\n /**\n * Trigger onStartReached on first load, if messages are not enough to fill the screen.\n * This is important especially for android, where you can't overscroll.\n */\n maybeCallOnStartReached(10);\n }\n\n messageListLengthBeforeUpdate.current = messageListLengthAfterUpdate;\n topMessageBeforeUpdate.current = topMessageAfterUpdate;\n }, [hasNoMoreRecentMessagesToLoad, messageListLengthAfterUpdate, topMessageAfterUpdate?.id]);\n\n useEffect(() => {\n setAutoscrollToTop(hasNoMoreRecentMessagesToLoad);\n }, [messageList, hasNoMoreRecentMessagesToLoad]);\n\n const shouldApplyAndroidWorkaround = inverted && Platform.OS === 'android';\n\n const renderItem = ({\n index,\n item: message,\n }: {\n index: number;\n item: MessageType<StreamChatGenerics>;\n }) => {\n if (!channel || channel.disconnected || (!channel.initialized && !channel.offlineMode))\n return null;\n\n const lastRead = channel.lastRead();\n\n function isMessageUnread(messageArrayIndex: number): boolean {\n const msg = messageList?.[messageArrayIndex];\n if (lastRead && msg?.created_at) {\n return lastRead < msg.created_at;\n }\n return false;\n }\n\n const isCurrentMessageUnread = isMessageUnread(index);\n const showUnreadUnderlay =\n !channel.muteStatus().muted && isCurrentMessageUnread && scrollToBottomButtonVisible;\n const insertInlineUnreadIndicator = showUnreadUnderlay && !isMessageUnread(index + 1); // show only if previous message is read\n\n if (message.type === 'system') {\n return (\n <>\n <View testID={`message-list-item-${index}`}>\n <MessageSystem\n message={message}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n />\n </View>\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n );\n }\n\n const wrapMessageInTheme = client.userID === message.user?.id && !!myMessageTheme;\n return wrapMessageInTheme ? (\n <>\n {shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n <ThemeProvider mergedStyle={modifiedTheme}>\n <View testID={`message-list-item-${index}`}>\n <Message\n goToMessage={goToMessage}\n groupStyles={\n isMessageWithStylesReadByAndDateSeparator(message) ? message.groupStyles : []\n }\n isTargetedMessage={targetedMessage === message.id}\n lastReceivedId={lastReceivedId === message.id ? lastReceivedId : undefined}\n message={message}\n onThreadSelect={onThreadSelect}\n showUnreadUnderlay={showUnreadUnderlay}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n threadList={threadList}\n />\n </View>\n </ThemeProvider>\n {!shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n {/* Adding indicator below the messages, since the list is inverted */}\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n ) : (\n <>\n <View testID={`message-list-item-${index}`}>\n {shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n <Message\n goToMessage={goToMessage}\n groupStyles={\n isMessageWithStylesReadByAndDateSeparator(message) ? message.groupStyles : []\n }\n isTargetedMessage={targetedMessage === message.id}\n lastReceivedId={\n lastReceivedId === message.id || message.quoted_message_id\n ? lastReceivedId\n : undefined\n }\n message={message}\n onThreadSelect={onThreadSelect}\n showUnreadUnderlay={showUnreadUnderlay}\n style={[{ paddingHorizontal: screenPadding }, messageContainer]}\n threadList={threadList}\n />\n </View>\n {!shouldApplyAndroidWorkaround &&\n isMessageWithStylesReadByAndDateSeparator(message) &&\n message.dateSeparator && <InlineDateSeparator date={message.dateSeparator} />}\n {/* Adding indicator below the messages, since the list is inverted */}\n {insertInlineUnreadIndicator && <InlineUnreadIndicator />}\n </>\n );\n };\n\n /**\n * We are keeping full control on message pagination, and not relying on react-native for it.\n * The reasons being,\n * 1. FlatList doesn't support onStartReached prop\n * 2. `onEndReached` function prop available on react-native, gets executed\n * once per content length (and thats actually a nice optimization strategy).\n * But it also means, we always need to prioritize onEndReached above our\n * logic for `onStartReached`.\n * 3. `onEndReachedThreshold` prop decides - at which scroll position to call `onEndReached`.\n * Its a factor of content length (which is necessary for \"real\" infinite scroll). But on\n * the other hand, it also makes calls to `onEndReached` (and this `channel.query`) way\n * too early during scroll, which we don't really need. So we are going to instead\n * keep some fixed offset distance, to decide when to call `loadMore` or `loadMoreRecent`.\n *\n * We are still gonna keep the optimization, which react-native does - only call onEndReached\n * once per content length.\n */\n\n /**\n * 1. Makes a call to `loadMoreRecent` function, which queries more recent messages.\n * 2. Ensures that we call `loadMoreRecent`, once per content length\n * 3. If the call to `loadMore` is in progress, we wait for it to finish to make sure scroll doesn't jump.\n */\n const maybeCallOnStartReached = async (limit?: number) => {\n // If onStartReached has already been called for given data length, then ignore.\n if (messageList?.length && onStartReachedTracker.current[messageList.length]) {\n return;\n }\n\n if (messageList?.length) {\n onStartReachedTracker.current[messageList.length] = true;\n }\n\n const callback = () => {\n onStartReachedInPromise.current = null;\n\n return Promise.resolve();\n };\n\n const onError = () => {\n /** Release the onStartReached trigger after 2 seconds, to try again */\n setTimeout(() => {\n onStartReachedTracker.current = {};\n }, 2000);\n };\n\n // If onEndReached is in progress, better to wait for it to finish for smooth UX\n if (onEndReachedInPromise.current) {\n await onEndReachedInPromise.current;\n onStartReachedInPromise.current = loadMoreRecent(limit).then(callback).catch(onError);\n } else {\n onStartReachedInPromise.current = loadMoreRecent(limit).then(callback).catch(onError);\n }\n };\n\n /**\n * 1. Makes a call to `loadMore` function, which queries more older messages.\n * 2. Ensures that we call `loadMore`, once per content length\n * 3. If the call to `loadMoreRecent` is in progress, we wait for it to finish to make sure scroll doesn't jump.\n */\n const maybeCallOnEndReached = async () => {\n // If onEndReached has already been called for given messageList length, then ignore.\n if (messageList?.length && onEndReachedTracker.current[messageList.length]) {\n return;\n }\n\n if (messageList?.length) {\n onEndReachedTracker.current[messageList.length] = true;\n }\n\n const callback = () => {\n onEndReachedInPromise.current = null;\n return Promise.resolve();\n };\n\n const onError = () => {\n /** Release the onEndReachedTracker trigger after 2 seconds, to try again */\n setTimeout(() => {\n onEndReachedTracker.current = {};\n }, 2000);\n };\n\n // If onStartReached is in progress, better to wait for it to finish for smooth UX\n if (onStartReachedInPromise.current) {\n await onStartReachedInPromise.current;\n onEndReachedInPromise.current = (threadList ? loadMoreThread() : loadMore())\n .then(callback)\n .catch(onError);\n } else {\n onEndReachedInPromise.current = (threadList ? loadMoreThread() : loadMore())\n .then(callback)\n .catch(onError);\n }\n };\n\n /**\n * Method used only inside the List to do these things\n * 1. Mark channel as read if scroll is at the bottom\n * 2. Call maybeCallOnStartReached if scroll is at the top\n * 3. Call maybeCallOnEndReached if scroll is at the bottom\n * 4. Show scrollToBottom button if scroll is at the bottom and messages are not the latest\n */\n const onScrollEvent: ScrollViewProps['onScroll'] = (event) => {\n if (!channel || !channelResyncScrollSet.current) {\n return;\n }\n\n const offset = event.nativeEvent.contentOffset.y;\n const visibleLength = event.nativeEvent.layoutMeasurement.height;\n const contentLength = event.nativeEvent.contentSize.height;\n // Check if scroll has reached either start of end of list.\n const isScrollAtStart = offset < 100;\n const isScrollAtEnd = contentLength - visibleLength - offset < 100;\n\n if (isScrollAtStart) {\n maybeCallOnStartReached();\n }\n\n if (isScrollAtEnd) {\n maybeCallOnEndReached();\n }\n\n // Show scrollToBottom button once scroll position goes beyond 150.\n const isScrollAtBottom = offset <= 150;\n\n /**\n * Following if condition covers following cases:\n * 1. If I scroll up -> show scrollToBottom button.\n * 2. If I scroll to bottom of screen\n * |-> hide scrollToBottom button.\n * |-> if channel is unread, call markRead().\n */\n\n const showScrollToBottomButton = !isScrollAtBottom || !hasNoMoreRecentMessagesToLoad;\n\n const shouldMarkRead =\n !threadList && offset <= 0 && hasNoMoreRecentMessagesToLoad && channel.countUnread() > 0;\n\n if (shouldMarkRead) {\n markRead();\n }\n\n setScrollToBottomButtonVisible(showScrollToBottomButton);\n };\n\n const handleScroll: ScrollViewProps['onScroll'] = (event) => {\n onScrollEvent(event);\n\n if (onListScroll) {\n onListScroll(event);\n }\n };\n\n const goToNewMessages = async () => {\n if (!hasNoMoreRecentMessagesToLoad) {\n resetPaginationTrackersRef.current();\n await reloadChannel();\n } else if (flatListRef.current) {\n flatListRef.current.scrollToOffset({\n offset: 0,\n });\n }\n\n setScrollToBottomButtonVisible(false);\n if (!threadList) {\n markRead();\n }\n };\n\n const scrollToIndexFailedRetryCountRef = useRef<number>(0);\n const failScrollTimeoutId = useRef<NodeJS.Timeout>();\n const onScrollToIndexFailedRef = useRef<\n FlatListProps<MessageType<StreamChatGenerics>>['onScrollToIndexFailed']\n >((info) => {\n // We got a failure as we tried to scroll to an item that was outside the render length\n if (!flatListRef.current) return;\n const dataLength = flatListRef.current.props?.data?.length;\n if (dataLength) {\n tempDisablePaginationTrackersRef.current(dataLength);\n }\n // we don't know the actual size of all items but we can see the average, so scroll to the closest offset\n flatListRef.current.scrollToOffset({\n animated: false,\n offset: info.averageItemLength * info.index,\n });\n // since we used only an average offset... we won't go to the center of the item yet\n // with a little delay to wait for scroll to offset to complete, we can then scroll to the index\n failScrollTimeoutId.current = setTimeout(() => {\n try {\n if (dataLength) {\n tempDisablePaginationTrackersRef.current(dataLength);\n }\n flatListRef.current?.scrollToIndex({\n animated: false,\n index: info.index,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n // in case the target message was cleared out\n // the state being set again will trigger the highlight again\n if (messageIdLastScrolledToRef.current) {\n setTargetedMessage(messageIdLastScrolledToRef.current);\n }\n scrollToIndexFailedRetryCountRef.current = 0;\n } catch (e) {\n if (\n !onScrollToIndexFailedRef.current ||\n scrollToIndexFailedRetryCountRef.current > MAX_RETRIES_AFTER_SCROLL_FAILURE\n ) {\n console.log(\n `Scrolling to index failed after ${MAX_RETRIES_AFTER_SCROLL_FAILURE} retries`,\n e,\n );\n scrollToIndexFailedRetryCountRef.current = 0;\n return;\n }\n // At some cases the index we're trying to scroll to, doesn't exist yet in the messageList\n // Scrolling to an index not in range of the Flatlist's data will result in a crash that\n // won't call onScrollToIndexFailed.\n // By catching this error we retry scrolling by calling onScrollToIndexFailedRef\n scrollToIndexFailedRetryCountRef.current += 1;\n onScrollToIndexFailedRef.current(info);\n }\n }, WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT);\n\n // Only when index is greater than 0 and in range of items in FlatList\n // this onScrollToIndexFailed will be called again\n });\n\n const goToMessage = useCallback(\n (messageId: string) => {\n const indexOfParentInMessageList = messageList.findIndex(\n (message) => message?.id === messageId,\n );\n if (indexOfParentInMessageList !== -1 && flatListRef.current) {\n clearTimeout(failScrollTimeoutId.current);\n scrollToIndexFailedRetryCountRef.current = 0;\n // we are scrolling automatically to the message instead of user initiating it,\n // so we don't need to load more older messages\n tempDisablePaginationTrackersRef.current(messageList.length);\n // now scroll to it\n flatListRef.current.scrollToIndex({\n animated: true,\n index: indexOfParentInMessageList,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n // keep track of this messageId, so that we dont scroll to again in useEffect for targeted message change\n messageIdLastScrolledToRef.current = messageId;\n setTargetedMessage(messageId);\n return;\n }\n messageIdToScrollToRef.current = messageId; // keep track of the id to scroll afterwards\n loadChannelAroundMessage({ messageId }); // now try to load the message and whats around it\n resetPaginationTrackersRef.current();\n },\n [messageList],\n );\n\n /**\n * Check if a messageId needs to be scrolled to after list loads, and scroll to it\n * Note: This effect fires on every list change with a small debounce so that scrolling isnt abrupted by an immediate rerender\n */\n useEffect(() => {\n scrollToDebounceTimeoutRef.current = setTimeout(() => {\n if (initialScrollToFirstUnreadMessage) {\n clearTimeout(initialScrollSettingTimeoutRef.current);\n initialScrollSettingTimeoutRef.current = setTimeout(() => {\n // small timeout to ensure that handleScroll is called after scrollToIndex to set this flag\n setInitialScrollDone(true);\n }, 500);\n }\n // goToMessage method might have requested to scroll to a message\n let messageIdToScroll: string | undefined = messageIdToScrollToRef.current;\n if (targetedMessage && messageIdLastScrolledToRef.current !== targetedMessage) {\n // if some messageId was targeted but not scrolledTo yet\n // we have scroll to there after loading completes\n messageIdToScroll = targetedMessage;\n }\n if (!messageIdToScroll) return;\n const indexOfParentInMessageList = messageList.findIndex(\n (message) => message?.id === messageIdToScroll,\n );\n if (indexOfParentInMessageList !== -1 && flatListRef.current) {\n // By a fresh scroll we should clear the retries for the previous failed scroll\n clearTimeout(scrollToDebounceTimeoutRef.current);\n clearTimeout(failScrollTimeoutId.current);\n // we are scrolling automatically to the message instead of user initiating it,\n // so we don't need to load more older messages\n tempDisablePaginationTrackersRef.current(messageList.length);\n // reset the retry count\n scrollToIndexFailedRetryCountRef.current = 0;\n // now scroll to it\n flatListRef.current.scrollToIndex({\n animated: false,\n index: indexOfParentInMessageList,\n viewPosition: 0.5, // try to place message in the center of the screen\n });\n // reset the messageId tracker to not scroll to that again\n messageIdToScrollToRef.current = undefined;\n // keep track of this messageId, so that we dont scroll to again for targeted message change\n messageIdLastScrolledToRef.current = messageIdToScroll;\n }\n }, 150);\n }, [targetedMessage, initialScrollToFirstUnreadMessage, messageList]);\n\n const messagesWithImages =\n legacyImageViewerSwipeBehaviour &&\n messageList.filter((message) => {\n const isMessageTypeDeleted = message.type === 'deleted';\n if (!isMessageTypeDeleted && message.attachments) {\n return message.attachments.some(\n (attachment) =>\n attachment.type === 'image' &&\n !attachment.title_link &&\n !attachment.og_scrape_url &&\n (attachment.image_url || attachment.thumb_url),\n );\n }\n return false;\n });\n\n /**\n * This is for the useEffect to run again in the case that a message\n * gets edited with more or the same number of images\n */\n const imageString =\n legacyImageViewerSwipeBehaviour &&\n messagesWithImages &&\n messagesWithImages\n .map((message) =>\n message.attachments\n ?.map((attachment) => attachment.image_url || attachment.thumb_url || '')\n .join(),\n )\n .join();\n\n const numberOfMessagesWithImages =\n legacyImageViewerSwipeBehaviour && messagesWithImages && messagesWithImages.length;\n const threadExists = !!thread;\n\n useEffect(() => {\n if (\n legacyImageViewerSwipeBehaviour &&\n isListActive &&\n ((threadList && thread) || (!threadList && !thread))\n ) {\n setMessages(messagesWithImages as MessageType<StreamChatGenerics>[]);\n }\n }, [\n imageString,\n isListActive,\n legacyImageViewerSwipeBehaviour,\n numberOfMessagesWithImages,\n threadExists,\n threadList,\n ]);\n\n const stickyHeaderFormatDate =\n stickyHeaderDate?.getFullYear() === new Date().getFullYear() ? 'MMM D' : 'MMM D, YYYY';\n const tStickyHeaderDate =\n stickyHeaderDate && !hideStickyDateHeader ? tDateTimeParser(stickyHeaderDate) : null;\n\n const stickyHeaderDateString = useMemo(() => {\n if (tStickyHeaderDate === null || hideStickyDateHeader) return null;\n if (isDayOrMoment(tStickyHeaderDate)) return tStickyHeaderDate.format(stickyHeaderFormatDate);\n\n return new Date(tStickyHeaderDate).toDateString();\n }, [tStickyHeaderDate, stickyHeaderFormatDate, hideStickyDateHeader]);\n\n const dismissImagePicker = () => {\n if (!hasMoved && selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n }\n };\n const onScrollBeginDrag: ScrollViewProps['onScrollBeginDrag'] = (event) => {\n !hasMoved && selectedPicker && setHasMoved(true);\n onScrollEvent(event);\n };\n const onScrollEndDrag: ScrollViewProps['onScrollEndDrag'] = (event) => {\n hasMoved && selectedPicker && setHasMoved(false);\n onScrollEvent(event);\n };\n\n const refCallback = (ref: FlatListType<MessageType<StreamChatGenerics>>) => {\n flatListRef.current = ref;\n\n if (setFlatListRef) {\n setFlatListRef(ref);\n }\n };\n\n const debugRef = useDebugContext();\n\n const isDebugModeEnabled = __DEV__ && debugRef && debugRef.current;\n\n if (isDebugModeEnabled) {\n if (debugRef.current.setEventType) debugRef.current.setEventType('send');\n if (debugRef.current.setSendEventParams)\n debugRef.current.setSendEventParams({\n action: thread ? 'ThreadList' : 'Messages',\n data: messageList,\n });\n }\n\n const renderListEmptyComponent = useCallback(\n () => (\n <View\n style={[styles.flex, shouldApplyAndroidWorkaround ? styles.invertAndroid : styles.invert]}\n testID='empty-state'\n >\n <EmptyStateIndicator listType='message' />\n </View>\n ),\n [EmptyStateIndicator, shouldApplyAndroidWorkaround],\n );\n\n const ListFooterComponent = useCallback(\n () => (\n <View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>\n <FooterComponent />\n </View>\n ),\n [shouldApplyAndroidWorkaround, FooterComponent],\n );\n\n const ListHeaderComponent = useCallback(\n () => (\n <View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>\n <HeaderComponent />\n </View>\n ),\n [shouldApplyAndroidWorkaround, HeaderComponent],\n );\n\n if (!FlatList) return null;\n\n if (loading) {\n return (\n <View style={styles.flex}>\n <LoadingIndicator listType='message' />\n </View>\n );\n }\n\n const StickyHeaderComponent = () => {\n if (!stickyHeaderDateString) return null;\n if (StickyHeader) return <StickyHeader dateString={stickyHeaderDateString} />;\n if (messageListLengthAfterUpdate) return <DateHeader dateString={stickyHeaderDateString} />;\n return null;\n };\n\n // We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading\n let additionalFlatListPropsExcludingStyle:\n | Omit<NonNullable<typeof additionalFlatListProps>, 'style' | 'contentContainerStyle'>\n | undefined;\n\n if (additionalFlatListProps) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { contentContainerStyle, style, ...rest } = additionalFlatListProps;\n additionalFlatListPropsExcludingStyle = rest;\n }\n\n return (\n <View\n style={[styles.container, { backgroundColor: white_snow }, container]}\n testID='message-flat-list-wrapper'\n >\n <FlatList\n CellRendererComponent={\n shouldApplyAndroidWorkaround ? InvertedCellRendererComponent : undefined\n }\n contentContainerStyle={[\n styles.contentContainer,\n additionalFlatListProps?.contentContainerStyle,\n contentContainer,\n ]}\n data={messageList}\n /** Disables the MessageList UI. Which means, message actions, reactions won't work. */\n extraData={disabled || !hasNoMoreRecentMessagesToLoad}\n inverted={shouldApplyAndroidWorkaround ? false : inverted}\n keyboardShouldPersistTaps='handled'\n keyExtractor={keyExtractor}\n ListEmptyComponent={renderListEmptyComponent}\n ListFooterComponent={ListFooterComponent}\n ListHeaderComponent={ListHeaderComponent}\n maintainVisibleContentPosition={{\n autoscrollToTopThreshold: autoscrollToTop ? 10 : undefined,\n minIndexForVisible: 1,\n }}\n maxToRenderPerBatch={30}\n onScroll={handleScroll}\n onScrollBeginDrag={onScrollBeginDrag}\n onScrollEndDrag={onScrollEndDrag}\n onScrollToIndexFailed={onScrollToIndexFailedRef.current}\n onTouchEnd={dismissImagePicker}\n onViewableItemsChanged={onViewableItemsChanged.current}\n ref={refCallback}\n renderItem={renderItem}\n scrollEnabled={overlay === 'none'}\n showsVerticalScrollIndicator={!shouldApplyAndroidWorkaround}\n style={[\n styles.listContainer,\n listContainer,\n additionalFlatListProps?.style,\n shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined,\n ]}\n testID='message-flat-list'\n viewabilityConfig={flatListViewabilityConfig}\n {...additionalFlatListPropsExcludingStyle}\n />\n {!loading && (\n <>\n <View style={styles.stickyHeader}>\n <StickyHeaderComponent />\n </View>\n {!disableTypingIndicator && TypingIndicator && (\n <TypingIndicatorContainer>\n <TypingIndicator />\n </TypingIndicatorContainer>\n )}\n <ScrollToBottomButton\n onPress={goToNewMessages}\n showNotification={scrollToBottomButtonVisible}\n unreadCount={threadList ? 0 : channel?.countUnread()}\n />\n </>\n )}\n <NetworkDownIndicator />\n </View>\n );\n};\n\nexport type MessageListProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<MessageListPropsWithContext<StreamChatGenerics>>;\n\nexport const MessageList = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageListProps<StreamChatGenerics>,\n) => {\n const { closePicker, selectedPicker, setSelectedPicker } = useAttachmentPickerContext();\n const {\n channel,\n disabled,\n EmptyStateIndicator,\n enableMessageGroupingByUser,\n error,\n hideStickyDateHeader,\n isChannelActive,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n markRead,\n NetworkDownIndicator,\n reloadChannel,\n scrollToFirstUnreadThreshold,\n setTargetedMessage,\n StickyHeader,\n targetedMessage,\n } = useChannelContext<StreamChatGenerics>();\n const { client } = useChatContext<StreamChatGenerics>();\n const { setMessages } = useImageGalleryContext<StreamChatGenerics>();\n const {\n DateHeader,\n disableTypingIndicator,\n FlatList,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n legacyImageViewerSwipeBehaviour,\n Message,\n MessageSystem,\n myMessageTheme,\n ScrollToBottomButton,\n TypingIndicator,\n TypingIndicatorContainer,\n } = useMessagesContext<StreamChatGenerics>();\n const { hasNoMoreRecentMessagesToLoad, loadMore, loadMoreRecent } =\n usePaginatedMessageListContext<StreamChatGenerics>();\n const { overlay } = useOverlayContext();\n const { loadMoreThread, thread } = useThreadContext<StreamChatGenerics>();\n const { t, tDateTimeParser } = useTranslationContext();\n\n return (\n <MessageListWithContext\n {...{\n channel,\n client,\n closePicker,\n DateHeader,\n disabled,\n disableTypingIndicator,\n EmptyStateIndicator,\n enableMessageGroupingByUser,\n error,\n FlatList,\n hasNoMoreRecentMessagesToLoad,\n hideStickyDateHeader,\n initialScrollToFirstUnreadMessage,\n InlineDateSeparator,\n InlineUnreadIndicator,\n isListActive: isChannelActive,\n legacyImageViewerSwipeBehaviour,\n loadChannelAroundMessage,\n loading,\n LoadingIndicator,\n loadMore,\n loadMoreRecent,\n loadMoreThread,\n markRead,\n Message,\n MessageSystem,\n myMessageTheme,\n NetworkDownIndicator,\n overlay,\n reloadChannel,\n ScrollToBottomButton,\n scrollToFirstUnreadThreshold,\n selectedPicker,\n setMessages,\n setSelectedPicker,\n setTargetedMessage,\n StickyHeader,\n t,\n targetedMessage,\n tDateTimeParser,\n thread,\n TypingIndicator,\n TypingIndicatorContainer,\n }}\n {...props}\n noGroupByUser={!enableMessageGroupingByUser || props.noGroupByUser}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,eAAA,GAAAF,OAAA;AAKA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA;AACA,IAAAK,iCAAA,GAAAL,OAAA;AACA,IAAAM,uBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AAIA,IAAAQ,eAAA,GAAAR,OAAA;AAIA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAIA,IAAAY,gBAAA,GAAAZ,OAAA;AAIA,IAAAa,eAAA,GAAAb,OAAA;AAIA,IAAAc,4BAAA,GAAAd,OAAA;AAIA,IAAAe,aAAA,GAAAf,OAAA;AACA,IAAAgB,cAAA,GAAAhB,OAAA;AACA,IAAAiB,mBAAA,GAAAjB,OAAA;AAI8D,IAAAkB,SAAA;AAAA,IAAAC,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,e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ACbC,cAAc,EAAdA,cAAc;IACdC,oBAAoB,EAApBA,oBAAoB;IACpBI,OAAO,EAAPA,OAAO;IACPC,aAAa,EAAbA,aAAa;IACbC,oBAAoB,EAApBA,oBAAoB;IACpBmR,4BAA4B,EAA5BA,4BAA4B;IAC5BlR,cAAc,EAAdA,cAAc;IACdE,WAAW,EAAXA,WAAW;IACXC,iBAAiB,EAAjBA,iBAAiB;IACjBC,kBAAkB,EAAlBA,kBAAkB;IAClBC,YAAY,EAAZA,YAAY;IACZ4R,CAAC,EAADA,CAAC;IACD3R,eAAe,EAAfA,eAAe;IACfC,eAAe,EAAfA,eAAe;IACfC,MAAM,EAANA,MAAM;IACNE,eAAe,EAAfA,eAAe;IACfC,wBAAwB,EAAxBA;EAAwB,GAEtB9E,KAAK;IACT6D,aAAa,EAAE,CAACqR,2BAA2B,IAAIlV,KAAK,CAAC6D,aAAc;IAAAxD,MAAA,EAAAnD,KAAA;IAAAoD,QAAA;MAAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,EACpE,CAAC;AAEN,CAAC;AAAC4V,OAAA,CAAAxB,WAAA,GAAAA,WAAA"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"File type not supported": "File type not supported",
|
|
25
25
|
"Flag": "Flag",
|
|
26
26
|
"Flag Message": "Flag Message",
|
|
27
|
-
"Flag action failed either due to a network issue or the message is already flagged": "Flag action failed either due to a network issue or the message is already flagged
|
|
27
|
+
"Flag action failed either due to a network issue or the message is already flagged": "Flag action failed either due to a network issue or the message is already flagged",
|
|
28
28
|
"How about sending your first message to a friend?": "How about sending your first message to a friend?",
|
|
29
29
|
"Instant Commands": "Instant Commands",
|
|
30
30
|
"Let's start chatting!": "Let's start chatting!",
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "",
|
|
5
|
-
"Allow camera access in device settings": "",
|
|
2
|
+
"1 Reply": "1 Réponse",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "Autoriser l'accès à votre galerie",
|
|
5
|
+
"Allow camera access in device settings": "Autoriser l'accès à la caméra dans les paramètres de l'appareil",
|
|
6
6
|
"Also send to channel": "",
|
|
7
|
-
"Are you sure you want to permanently delete this message?": "
|
|
8
|
-
"Block User": "
|
|
9
|
-
"Cancel": "
|
|
10
|
-
"Cannot Flag Message": "
|
|
11
|
-
"Copy Message": "
|
|
12
|
-
"Delete": "
|
|
13
|
-
"Delete Message": "
|
|
14
|
-
"Device camera is used to take photos or videos.": "",
|
|
15
|
-
"Do you want to send a copy of this message to a moderator for further investigation?": "
|
|
16
|
-
"Edit Message": "
|
|
7
|
+
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
+
"Block User": "",
|
|
9
|
+
"Cancel": "",
|
|
10
|
+
"Cannot Flag Message": "",
|
|
11
|
+
"Copy Message": "",
|
|
12
|
+
"Delete": "",
|
|
13
|
+
"Delete Message": "",
|
|
14
|
+
"Device camera is used to take photos or videos.": "L'appareil photo de l'appareil est utilisé pour prendre des photos ou des vidéos.",
|
|
15
|
+
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
16
|
+
"Edit Message": "",
|
|
17
17
|
"Editing Message": "",
|
|
18
|
-
"Emoji matching": "",
|
|
18
|
+
"Emoji matching": "Correspondance Emoji",
|
|
19
19
|
"Empty message...": "",
|
|
20
20
|
"Error loading": "",
|
|
21
21
|
"Error loading channel list...": "",
|
|
22
22
|
"Error loading messages for this channel...": "",
|
|
23
23
|
"Error while loading, please reload/refresh": "",
|
|
24
24
|
"File type not supported": "Le type de fichier n'est pas pris en charge",
|
|
25
|
-
"Flag": "
|
|
26
|
-
"Flag Message": "
|
|
27
|
-
"Flag action failed either due to a network issue or the message is already flagged": "
|
|
25
|
+
"Flag": "",
|
|
26
|
+
"Flag Message": "",
|
|
27
|
+
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
28
28
|
"How about sending your first message to a friend?": "",
|
|
29
|
-
"Instant Commands": "",
|
|
29
|
+
"Instant Commands": "Commandes Instantanées",
|
|
30
30
|
"Let's start chatting!": "",
|
|
31
31
|
"Links are disabled": "Links are disabled",
|
|
32
|
-
"Loading channels...": "",
|
|
33
|
-
"Loading messages...": "",
|
|
34
|
-
"Loading...": "",
|
|
35
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
32
|
+
"Loading channels...": "Chargement des canaux...",
|
|
33
|
+
"Loading messages...": "Chargement des messages...",
|
|
34
|
+
"Loading...": "Chargement...",
|
|
35
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
36
36
|
"Message Reactions": "Réactions aux messages",
|
|
37
37
|
"Message deleted": "",
|
|
38
|
-
"Message flagged": "
|
|
39
|
-
"Mute User": "
|
|
40
|
-
"Not supported": "
|
|
38
|
+
"Message flagged": "",
|
|
39
|
+
"Mute User": "",
|
|
40
|
+
"Not supported": "",
|
|
41
41
|
"Nothing yet...": "",
|
|
42
|
-
"Ok": "
|
|
42
|
+
"Ok": "",
|
|
43
43
|
"Only visible to you": "",
|
|
44
|
-
"Open Settings": "",
|
|
45
|
-
"Photo": "",
|
|
46
|
-
"Photos and Videos": "",
|
|
47
|
-
"Pin to Conversation": "
|
|
48
|
-
"Pinned by": "
|
|
49
|
-
"Please enable access to your photos and videos so you can share them.": "",
|
|
50
|
-
"Please select a channel first": "
|
|
44
|
+
"Open Settings": "Ouvrir les paramètres",
|
|
45
|
+
"Photo": "Photo",
|
|
46
|
+
"Photos and Videos": "Photos et vidéos",
|
|
47
|
+
"Pin to Conversation": "",
|
|
48
|
+
"Pinned by": "",
|
|
49
|
+
"Please enable access to your photos and videos so you can share them.": "Veuillez autoriser l'accès à vos photos et vidéos afin de pouvoir les partager.",
|
|
50
|
+
"Please select a channel first": "",
|
|
51
51
|
"Reconnecting...": "",
|
|
52
|
-
"Reply": "
|
|
52
|
+
"Reply": "",
|
|
53
53
|
"Reply to Message": "",
|
|
54
|
-
"Resend": "
|
|
55
|
-
"Search GIFs": "
|
|
56
|
-
"Select More Photos": "",
|
|
57
|
-
"Send a message": "
|
|
54
|
+
"Resend": "",
|
|
55
|
+
"Search GIFs": "",
|
|
56
|
+
"Select More Photos": "Sélectionner plus de photos",
|
|
57
|
+
"Send a message": "",
|
|
58
58
|
"Sending links is not allowed in this conversation": "Sending links is not allowed in this conversation",
|
|
59
|
-
"Slow mode ON": "
|
|
60
|
-
"The message has been reported to a moderator.": "
|
|
61
|
-
"Thread Reply": "
|
|
62
|
-
"Unblock User": "
|
|
63
|
-
"Unknown User": "",
|
|
64
|
-
"Unmute User": "
|
|
65
|
-
"Unpin from Conversation": "
|
|
59
|
+
"Slow mode ON": "",
|
|
60
|
+
"The message has been reported to a moderator.": "",
|
|
61
|
+
"Thread Reply": "",
|
|
62
|
+
"Unblock User": "",
|
|
63
|
+
"Unknown User": "Utilisateur inconnu",
|
|
64
|
+
"Unmute User": "",
|
|
65
|
+
"Unpin from Conversation": "",
|
|
66
66
|
"Unread Messages": "",
|
|
67
|
-
"Video": "",
|
|
67
|
+
"Video": "Vidéo",
|
|
68
68
|
"You": "",
|
|
69
|
-
"You can't send messages in this channel": "",
|
|
69
|
+
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
70
70
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
71
|
-
"{{ index }} of {{ photoLength }}": "",
|
|
72
|
-
"{{ replyCount }} Replies": "",
|
|
73
|
-
"{{ replyCount }} Thread Replies": "
|
|
71
|
+
"{{ index }} of {{ photoLength }}": "{{ index }} sur {{ photoLength }}",
|
|
72
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Réponses",
|
|
73
|
+
"{{ replyCount }} Thread Replies": "",
|
|
74
74
|
"{{ user }} is typing": "",
|
|
75
75
|
"🏙 Attachment...": ""
|
|
76
76
|
}
|