stream-chat-react-native-core 5.12.0-beta.2 → 5.12.0-beta.4
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 +40 -24
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useTargetedMessage.js +3 -3
- package/lib/commonjs/components/Channel/hooks/useTargetedMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +9 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +96 -80
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js +9 -4
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/hooks/useAppStateListener.js +14 -10
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +40 -24
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useTargetedMessage.js +3 -3
- package/lib/module/components/Channel/hooks/useTargetedMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +9 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +96 -80
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js +9 -4
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/hooks/useAppStateListener.js +14 -10
- package/lib/module/hooks/useAppStateListener.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/package.json +1 -1
- package/src/components/Channel/Channel.tsx +35 -15
- package/src/components/Channel/hooks/useTargetedMessage.ts +3 -3
- package/src/components/ChannelPreview/ChannelPreview.tsx +7 -0
- package/src/components/MessageList/MessageList.tsx +75 -58
- package/src/components/MessageList/utils/getReadStates.ts +3 -4
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +2 -0
- package/src/hooks/useAppStateListener.ts +14 -11
- package/src/version.json +1 -1
|
@@ -19,15 +19,15 @@ var useTargetedMessage = function useTargetedMessage(messageId) {
|
|
|
19
19
|
clearTargetedMessageCall.current && clearTimeout(clearTargetedMessageCall.current);
|
|
20
20
|
};
|
|
21
21
|
}, []);
|
|
22
|
-
var
|
|
22
|
+
var setTargetedMessageTimeoutRef = (0, _react.useRef)(function (messageId) {
|
|
23
23
|
clearTargetedMessageCall.current && clearTimeout(clearTargetedMessageCall.current);
|
|
24
24
|
clearTargetedMessageCall.current = setTimeout(function () {
|
|
25
25
|
setTargetedMessage(undefined);
|
|
26
26
|
}, 3000);
|
|
27
27
|
setTargetedMessage(messageId);
|
|
28
|
-
};
|
|
28
|
+
});
|
|
29
29
|
return {
|
|
30
|
-
setTargetedMessage:
|
|
30
|
+
setTargetedMessage: setTargetedMessageTimeoutRef.current,
|
|
31
31
|
targetedMessage: targetedMessage
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","useTargetedMessage","messageId","clearTargetedMessageCall","useRef","_useState","useState","_useState2","_slicedToArray2","targetedMessage","setTargetedMessage","useEffect","current","setTimeout","undefined","clearTimeout","
|
|
1
|
+
{"version":3,"names":["_react","require","useTargetedMessage","messageId","clearTargetedMessageCall","useRef","_useState","useState","_useState2","_slicedToArray2","targetedMessage","setTargetedMessage","useEffect","current","setTimeout","undefined","clearTimeout","setTargetedMessageTimeoutRef","exports"],"sources":["useTargetedMessage.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport const useTargetedMessage = (messageId?: string) => {\n const clearTargetedMessageCall = useRef<ReturnType<typeof setTimeout>>();\n const [targetedMessage, setTargetedMessage] = useState(messageId);\n\n useEffect(() => {\n clearTargetedMessageCall.current = setTimeout(() => {\n setTargetedMessage(undefined);\n }, 3000);\n\n return () => {\n clearTargetedMessageCall.current && clearTimeout(clearTargetedMessageCall.current);\n };\n }, []);\n\n const setTargetedMessageTimeoutRef = useRef((messageId: string) => {\n clearTargetedMessageCall.current && clearTimeout(clearTargetedMessageCall.current);\n\n clearTargetedMessageCall.current = setTimeout(() => {\n setTargetedMessage(undefined);\n }, 3000);\n\n setTargetedMessage(messageId);\n });\n\n return {\n setTargetedMessage: setTargetedMessageTimeoutRef.current,\n targetedMessage,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,SAAkB,EAAK;EACxD,IAAMC,wBAAwB,GAAG,IAAAC,aAAM,GAAiC;EACxE,IAAAC,SAAA,GAA8C,IAAAC,eAAQ,EAACJ,SAAS,CAAC;IAAAK,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAA1DI,eAAe,GAAAF,UAAA;IAAEG,kBAAkB,GAAAH,UAAA;EAE1C,IAAAI,gBAAS,EAAC,YAAM;IACdR,wBAAwB,CAACS,OAAO,GAAGC,UAAU,CAAC,YAAM;MAClDH,kBAAkB,CAACI,SAAS,CAAC;IAC/B,CAAC,EAAE,IAAI,CAAC;IAER,OAAO,YAAM;MACXX,wBAAwB,CAACS,OAAO,IAAIG,YAAY,CAACZ,wBAAwB,CAACS,OAAO,CAAC;IACpF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAMI,4BAA4B,GAAG,IAAAZ,aAAM,EAAC,UAACF,SAAiB,EAAK;IACjEC,wBAAwB,CAACS,OAAO,IAAIG,YAAY,CAACZ,wBAAwB,CAACS,OAAO,CAAC;IAElFT,wBAAwB,CAACS,OAAO,GAAGC,UAAU,CAAC,YAAM;MAClDH,kBAAkB,CAACI,SAAS,CAAC;IAC/B,CAAC,EAAE,IAAI,CAAC;IAERJ,kBAAkB,CAACR,SAAS,CAAC;EAC/B,CAAC,CAAC;EAEF,OAAO;IACLQ,kBAAkB,EAAEM,4BAA4B,CAACJ,OAAO;IACxDH,eAAe,EAAfA;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA"}
|
|
@@ -35,6 +35,13 @@ var ChannelPreviewWithContext = function ChannelPreviewWithContext(props) {
|
|
|
35
35
|
var latestMessagePreview = (0, _useLatestMessagePreview.useLatestMessagePreview)(channel, forceUpdate, translatedLastMessage);
|
|
36
36
|
var channelLastMessage = channel.lastMessage();
|
|
37
37
|
var channelLastMessageString = "" + (channelLastMessage == null ? void 0 : channelLastMessage.id) + (channelLastMessage == null ? void 0 : channelLastMessage.updated_at);
|
|
38
|
+
(0, _react.useEffect)(function () {
|
|
39
|
+
var _client$on = client.on('notification.mark_read', function () {
|
|
40
|
+
setUnread(channel.countUnread());
|
|
41
|
+
}),
|
|
42
|
+
unsubscribe = _client$on.unsubscribe;
|
|
43
|
+
return unsubscribe;
|
|
44
|
+
}, []);
|
|
38
45
|
(0, _react.useEffect)(function () {
|
|
39
46
|
if (channelLastMessage && (channelLastMessage.id !== (lastMessage == null ? void 0 : lastMessage.id) || channelLastMessage.updated_at !== (lastMessage == null ? void 0 : lastMessage.updated_at))) {
|
|
40
47
|
setLastMessage(channelLastMessage);
|
|
@@ -89,7 +96,7 @@ var ChannelPreviewWithContext = function ChannelPreviewWithContext(props) {
|
|
|
89
96
|
__self: _this,
|
|
90
97
|
__source: {
|
|
91
98
|
fileName: _jsxFileName,
|
|
92
|
-
lineNumber:
|
|
99
|
+
lineNumber: 115,
|
|
93
100
|
columnNumber: 10
|
|
94
101
|
}
|
|
95
102
|
});
|
|
@@ -106,7 +113,7 @@ var ChannelPreview = function ChannelPreview(props) {
|
|
|
106
113
|
__self: _this,
|
|
107
114
|
__source: {
|
|
108
115
|
fileName: _jsxFileName,
|
|
109
|
-
lineNumber:
|
|
116
|
+
lineNumber: 131,
|
|
110
117
|
columnNumber: 10
|
|
111
118
|
}
|
|
112
119
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_useLatestMessagePreview","_ChannelsContext","_ChatContext","_useTranslatedMessage","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ChannelPreviewWithContext","props","channel","client","Preview","_useState","useState","state","messages","length","_useState2","_slicedToArray2","lastMessage","setLastMessage","translatedLastMessage","useTranslatedMessage","_useState3","_useState4","forceUpdate","setForceUpdate","_useState5","countUnread","_useState6","unread","setUnread","latestMessagePreview","useLatestMessagePreview","channelLastMessage","channelLastMessageString","id","updated_at","useEffect","newUnreadCount","handleNewMessageEvent","event","message","parent_id","show_in_channel","handleUpdatedOrDeletedMessage","prevLastMessage","_event$message","listeners","on","forEach","l","unsubscribe","handleReadEvent","_event$user","_event$user2","user","userID","prev","listener","createElement","__self","__source","fileName","lineNumber","columnNumber","ChannelPreview","_useChatContext","useChatContext","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreview.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { Channel, ChannelState, Event, MessageResponse } from 'stream-chat';\n\nimport { useLatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\n\nimport { useTranslatedMessage } from '../../hooks/useTranslatedMessage';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ChannelsContextValue<StreamChatGenerics>, 'Preview'> & {\n /**\n * The previewed channel\n */\n channel: Channel<StreamChatGenerics>;\n };\n\n/**\n * This component manages state for the ChannelPreviewMessenger UI component and receives\n * all props from the ChannelListMessenger component.\n */\nconst ChannelPreviewWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewPropsWithContext<StreamChatGenerics>,\n) => {\n const { channel, client, Preview } = props;\n\n const [lastMessage, setLastMessage] = useState<\n | ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>\n | MessageResponse<StreamChatGenerics>\n | undefined\n >(channel.state.messages[channel.state.messages.length - 1]);\n\n const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(\n lastMessage || ({} as MessageResponse<StreamChatGenerics>),\n );\n\n const [forceUpdate, setForceUpdate] = useState(0);\n const [unread, setUnread] = useState(channel.countUnread());\n\n const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate, translatedLastMessage);\n\n const channelLastMessage = channel.lastMessage();\n const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;\n\n useEffect(() => {\n if (\n channelLastMessage &&\n (channelLastMessage.id !== lastMessage?.id ||\n channelLastMessage.updated_at !== lastMessage?.updated_at)\n ) {\n setLastMessage(channelLastMessage);\n }\n\n const newUnreadCount = channel.countUnread();\n setUnread(newUnreadCount);\n }, [channelLastMessageString]);\n\n useEffect(() => {\n const handleNewMessageEvent = (event: Event<StreamChatGenerics>) => {\n const message = event.message;\n if (message && (!message.parent_id || message.show_in_channel)) {\n setLastMessage(event.message);\n setUnread(channel.countUnread());\n }\n };\n\n const handleUpdatedOrDeletedMessage = (event: Event<StreamChatGenerics>) => {\n setLastMessage((prevLastMessage) => {\n if (prevLastMessage?.id === event.message?.id) {\n return event.message;\n }\n return prevLastMessage;\n });\n };\n\n const listeners = [\n channel.on('message.new', handleNewMessageEvent),\n channel.on('message.updated', handleUpdatedOrDeletedMessage),\n channel.on('message.deleted', handleUpdatedOrDeletedMessage),\n ];\n\n return () => listeners.forEach((l) => l.unsubscribe());\n }, []);\n\n useEffect(() => {\n const handleReadEvent = (event: Event<StreamChatGenerics>) => {\n if (event.user?.id === client.userID) {\n setUnread(0);\n } else if (event.user?.id) {\n setForceUpdate((prev) => prev + 1);\n }\n };\n\n const listener = channel.on('message.read', handleReadEvent);\n return () => listener.unsubscribe();\n }, []);\n\n return <Preview channel={channel} latestMessagePreview={latestMessagePreview} unread={unread} />;\n};\n\nexport type ChannelPreviewProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>> &\n Pick<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>;\n\nexport const ChannelPreview = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewProps<StreamChatGenerics>,\n) => {\n const { client } = useChatContext<StreamChatGenerics>();\n const { Preview } = useChannelsContext<StreamChatGenerics>();\n\n return <ChannelPreviewWithContext {...{ client, Preview }} {...props} />;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAIA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AAAwE,IAAAK,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,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAA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AA,OAAKA,IAAI,GAAG,CAAC;QAAA,EAAC;MACpC;IACF,CAAC;IAED,IAAMC,QAAQ,GAAGlD,OAAO,CAACwC,EAAE,CAAC,cAAc,EAAEI,eAAe,CAAC;IAC5D,OAAO;MAAA,OAAMM,QAAQ,CAACP,WAAW,EAAE;IAAA;EACrC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO5E,MAAA,YAAAoF,aAAA,CAACjD,OAAO;IAACF,OAAO,EAAEA,OAAQ;IAACuB,oBAAoB,EAAEA,oBAAqB;IAACF,MAAM,EAAEA,MAAO;IAAA+B,MAAA,EAAA9E,KAAA;IAAA+E,QAAA;MAAAC,QAAA,EAAA/E,YAAA;MAAAgF,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG;AAClG,CAAC;AAOM,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAGzB1D,KAA8C,EAC3C;EACH,IAAA2D,eAAA,GAAmB,IAAAC,2BAAc,GAAsB;IAA/C1D,MAAM,GAAAyD,eAAA,CAANzD,MAAM;EACd,IAAA2D,mBAAA,GAAoB,IAAAC,mCAAkB,GAAsB;IAApD3D,OAAO,GAAA0D,mBAAA,CAAP1D,OAAO;EAEf,OAAOnC,MAAA,YAAAoF,aAAA,CAACrD,yBAAyB,MAAAgE,SAAA;IAAO7D,MAAM,EAANA,MAAM;IAAEC,OAAO,EAAPA;EAAO,GAAQH,KAAK;IAAAqD,MAAA,EAAA9E,KAAA;IAAA+E,QAAA;MAAAC,QAAA,EAAA/E,YAAA;MAAAgF,UAAA;MAAAC,YAAA;IAAA;EAAA,GAAI;AAC1E,CAAC;AAACO,OAAA,CAAAN,cAAA,GAAAA,cAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_useLatestMessagePreview","_ChannelsContext","_ChatContext","_useTranslatedMessage","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ChannelPreviewWithContext","props","channel","client","Preview","_useState","useState","state","messages","length","_useState2","_slicedToArray2","lastMessage","setLastMessage","translatedLastMessage","useTranslatedMessage","_useState3","_useState4","forceUpdate","setForceUpdate","_useState5","countUnread","_useState6","unread","setUnread","latestMessagePreview","useLatestMessagePreview","channelLastMessage","channelLastMessageString","id","updated_at","useEffect","_client$on","on","unsubscribe","newUnreadCount","handleNewMessageEvent","event","message","parent_id","show_in_channel","handleUpdatedOrDeletedMessage","prevLastMessage","_event$message","listeners","forEach","l","handleReadEvent","_event$user","_event$user2","user","userID","prev","listener","createElement","__self","__source","fileName","lineNumber","columnNumber","ChannelPreview","_useChatContext","useChatContext","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreview.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { Channel, ChannelState, Event, MessageResponse } from 'stream-chat';\n\nimport { useLatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\n\nimport { useTranslatedMessage } from '../../hooks/useTranslatedMessage';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ChannelsContextValue<StreamChatGenerics>, 'Preview'> & {\n /**\n * The previewed channel\n */\n channel: Channel<StreamChatGenerics>;\n };\n\n/**\n * This component manages state for the ChannelPreviewMessenger UI component and receives\n * all props from the ChannelListMessenger component.\n */\nconst ChannelPreviewWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewPropsWithContext<StreamChatGenerics>,\n) => {\n const { channel, client, Preview } = props;\n\n const [lastMessage, setLastMessage] = useState<\n | ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>\n | MessageResponse<StreamChatGenerics>\n | undefined\n >(channel.state.messages[channel.state.messages.length - 1]);\n\n const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(\n lastMessage || ({} as MessageResponse<StreamChatGenerics>),\n );\n\n const [forceUpdate, setForceUpdate] = useState(0);\n const [unread, setUnread] = useState(channel.countUnread());\n\n const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate, translatedLastMessage);\n\n const channelLastMessage = channel.lastMessage();\n const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;\n\n useEffect(() => {\n const { unsubscribe } = client.on('notification.mark_read', () => {\n setUnread(channel.countUnread());\n });\n return unsubscribe;\n }, []);\n\n useEffect(() => {\n if (\n channelLastMessage &&\n (channelLastMessage.id !== lastMessage?.id ||\n channelLastMessage.updated_at !== lastMessage?.updated_at)\n ) {\n setLastMessage(channelLastMessage);\n }\n\n const newUnreadCount = channel.countUnread();\n setUnread(newUnreadCount);\n }, [channelLastMessageString]);\n\n useEffect(() => {\n const handleNewMessageEvent = (event: Event<StreamChatGenerics>) => {\n const message = event.message;\n if (message && (!message.parent_id || message.show_in_channel)) {\n setLastMessage(event.message);\n setUnread(channel.countUnread());\n }\n };\n\n const handleUpdatedOrDeletedMessage = (event: Event<StreamChatGenerics>) => {\n setLastMessage((prevLastMessage) => {\n if (prevLastMessage?.id === event.message?.id) {\n return event.message;\n }\n return prevLastMessage;\n });\n };\n\n const listeners = [\n channel.on('message.new', handleNewMessageEvent),\n channel.on('message.updated', handleUpdatedOrDeletedMessage),\n channel.on('message.deleted', handleUpdatedOrDeletedMessage),\n ];\n\n return () => listeners.forEach((l) => l.unsubscribe());\n }, []);\n\n useEffect(() => {\n const handleReadEvent = (event: Event<StreamChatGenerics>) => {\n if (event.user?.id === client.userID) {\n setUnread(0);\n } else if (event.user?.id) {\n setForceUpdate((prev) => prev + 1);\n }\n };\n\n const listener = channel.on('message.read', handleReadEvent);\n return () => listener.unsubscribe();\n }, []);\n\n return <Preview channel={channel} latestMessagePreview={latestMessagePreview} unread={unread} />;\n};\n\nexport type ChannelPreviewProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>> &\n Pick<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>;\n\nexport const ChannelPreview = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewProps<StreamChatGenerics>,\n) => {\n const { client } = useChatContext<StreamChatGenerics>();\n const { Preview } = useChannelsContext<StreamChatGenerics>();\n\n return <ChannelPreviewWithContext {...{ client, Preview }} {...props} />;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAIA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AAAwE,IAAAK,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,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE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
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MessageList = void 0;
|
|
7
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
7
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
8
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -26,6 +27,7 @@ var _PaginatedMessageListContext = require("../../contexts/paginatedMessageListC
|
|
|
26
27
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
27
28
|
var _ThreadContext = require("../../contexts/threadContext/ThreadContext");
|
|
28
29
|
var _TranslationContext = require("../../contexts/translationContext/TranslationContext");
|
|
30
|
+
var _excluded = ["contentContainerStyle", "style"];
|
|
29
31
|
var _this = this,
|
|
30
32
|
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/MessageList/MessageList.tsx";
|
|
31
33
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -129,7 +131,6 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
129
131
|
overlay = props.overlay,
|
|
130
132
|
reloadChannel = props.reloadChannel,
|
|
131
133
|
ScrollToBottomButton = props.ScrollToBottomButton,
|
|
132
|
-
scrollToFirstUnreadThreshold = props.scrollToFirstUnreadThreshold,
|
|
133
134
|
selectedPicker = props.selectedPicker,
|
|
134
135
|
setFlatListRef = props.setFlatListRef,
|
|
135
136
|
setMessages = props.setMessages,
|
|
@@ -173,27 +174,31 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
173
174
|
var onStartReachedInPromise = (0, _react.useRef)(null);
|
|
174
175
|
var onEndReachedInPromise = (0, _react.useRef)(null);
|
|
175
176
|
var flatListRef = (0, _react.useRef)(null);
|
|
176
|
-
var
|
|
177
|
+
var _useState3 = (0, _react.useState)(!initialScrollToFirstUnreadMessage),
|
|
178
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
179
|
+
isInitialScrollDone = _useState4[0],
|
|
180
|
+
setInitialScrollDone = _useState4[1];
|
|
177
181
|
var channelResyncScrollSet = (0, _react.useRef)(true);
|
|
178
182
|
var scrollToDebounceTimeoutRef = (0, _react.useRef)();
|
|
183
|
+
var initialScrollSettingTimeoutRef = (0, _react.useRef)();
|
|
179
184
|
var messageIdToScrollToRef = (0, _react.useRef)();
|
|
180
185
|
var messageIdLastScrolledToRef = (0, _react.useRef)();
|
|
181
|
-
var
|
|
182
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
183
|
-
hasMoved = _useState4[0],
|
|
184
|
-
setHasMoved = _useState4[1];
|
|
185
|
-
var _useState5 = (0, _react.useState)((_getLastReceivedMessa = (0, _getLastReceivedMessage.getLastReceivedMessage)(messageList)) == null ? void 0 : _getLastReceivedMessa.id),
|
|
186
|
+
var _useState5 = (0, _react.useState)(false),
|
|
186
187
|
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var _useState7 = (0, _react.useState)(
|
|
188
|
+
hasMoved = _useState6[0],
|
|
189
|
+
setHasMoved = _useState6[1];
|
|
190
|
+
var _useState7 = (0, _react.useState)((_getLastReceivedMessa = (0, _getLastReceivedMessage.getLastReceivedMessage)(messageList)) == null ? void 0 : _getLastReceivedMessa.id),
|
|
190
191
|
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
var _useState9 = (0, _react.useState)(),
|
|
192
|
+
lastReceivedId = _useState8[0],
|
|
193
|
+
setLastReceivedId = _useState8[1];
|
|
194
|
+
var _useState9 = (0, _react.useState)(false),
|
|
194
195
|
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
scrollToBottomButtonVisible = _useState10[0],
|
|
197
|
+
setScrollToBottomButtonVisible = _useState10[1];
|
|
198
|
+
var _useState11 = (0, _react.useState)(),
|
|
199
|
+
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
200
|
+
stickyHeaderDate = _useState12[0],
|
|
201
|
+
setStickyHeaderDate = _useState12[1];
|
|
197
202
|
var stickyHeaderDateRef = (0, _react.useRef)();
|
|
198
203
|
var channelRef = (0, _react.useRef)(channel);
|
|
199
204
|
channelRef.current = channel;
|
|
@@ -225,11 +230,23 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
225
230
|
setScrollToBottomButtonVisible(false);
|
|
226
231
|
}, [disabled]);
|
|
227
232
|
(0, _react.useEffect)(function () {
|
|
228
|
-
var
|
|
229
|
-
|
|
233
|
+
var getShouldMarkReadAutomatically = function getShouldMarkReadAutomatically() {
|
|
234
|
+
if (loading || !channel) {
|
|
235
|
+
return false;
|
|
236
|
+
} else if (channel.countUnread() > 0) {
|
|
237
|
+
if (!initialScrollToFirstUnreadMessage) {
|
|
238
|
+
return true;
|
|
239
|
+
} else {
|
|
240
|
+
if (scrollToBottomButtonVisible) return false;
|
|
241
|
+
return isInitialScrollDone;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return false;
|
|
245
|
+
};
|
|
246
|
+
if (getShouldMarkReadAutomatically()) {
|
|
230
247
|
markRead();
|
|
231
248
|
}
|
|
232
|
-
}, [loading]);
|
|
249
|
+
}, [loading, scrollToBottomButtonVisible, isInitialScrollDone]);
|
|
233
250
|
(0, _react.useEffect)(function () {
|
|
234
251
|
var _lastReceivedMessage$;
|
|
235
252
|
var lastReceivedMessage = (0, _getLastReceivedMessage.getLastReceivedMessage)(messageList);
|
|
@@ -261,7 +278,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
261
278
|
};
|
|
262
279
|
if (threadList || hasNoMoreRecentMessagesToLoad) {
|
|
263
280
|
scrollToBottomIfNeeded();
|
|
264
|
-
} else
|
|
281
|
+
} else {
|
|
265
282
|
setScrollToBottomButtonVisible(true);
|
|
266
283
|
}
|
|
267
284
|
if (!hasNoMoreRecentMessagesToLoad && flatListRef.current && messageListLengthBeforeUpdate.current === 0 && messageListLengthAfterUpdate < 10) {
|
|
@@ -280,28 +297,23 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
280
297
|
message = _ref2.item;
|
|
281
298
|
if (!channel || !channel.initialized && !channel.offlineMode) return null;
|
|
282
299
|
var lastRead = channel.lastRead();
|
|
283
|
-
var countUnread = channel.countUnread();
|
|
284
300
|
function isMessageUnread(messageArrayIndex) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
var isLatestMessageSetShown = !!channel.state.messageSets.find(function (set) {
|
|
289
|
-
return set.isCurrent && set.isLatest;
|
|
290
|
-
});
|
|
291
|
-
return isLatestMessageSetShown && messageArrayIndex <= countUnread - 1;
|
|
301
|
+
var msg = messageList == null ? void 0 : messageList[messageArrayIndex];
|
|
302
|
+
if (lastRead && msg != null && msg.created_at) {
|
|
303
|
+
return lastRead < msg.created_at;
|
|
292
304
|
}
|
|
305
|
+
return false;
|
|
293
306
|
}
|
|
294
307
|
var isCurrentMessageUnread = isMessageUnread(index);
|
|
295
|
-
var isLastMessageUnread = isMessageUnread(index + 1);
|
|
296
308
|
var showUnreadUnderlay = isCurrentMessageUnread && scrollToBottomButtonVisible;
|
|
297
|
-
var insertInlineUnreadIndicator = showUnreadUnderlay && !
|
|
309
|
+
var insertInlineUnreadIndicator = showUnreadUnderlay && !isMessageUnread(index + 1);
|
|
298
310
|
if (message.type === 'system') {
|
|
299
311
|
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_reactNative.View, {
|
|
300
312
|
testID: "message-list-item-" + index,
|
|
301
313
|
__self: _this,
|
|
302
314
|
__source: {
|
|
303
315
|
fileName: _jsxFileName,
|
|
304
|
-
lineNumber:
|
|
316
|
+
lineNumber: 560,
|
|
305
317
|
columnNumber: 11
|
|
306
318
|
}
|
|
307
319
|
}, _react["default"].createElement(MessageSystem, {
|
|
@@ -310,14 +322,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
310
322
|
__self: _this,
|
|
311
323
|
__source: {
|
|
312
324
|
fileName: _jsxFileName,
|
|
313
|
-
lineNumber:
|
|
325
|
+
lineNumber: 561,
|
|
314
326
|
columnNumber: 13
|
|
315
327
|
}
|
|
316
328
|
})), insertInlineUnreadIndicator && _react["default"].createElement(InlineUnreadIndicator, {
|
|
317
329
|
__self: _this,
|
|
318
330
|
__source: {
|
|
319
331
|
fileName: _jsxFileName,
|
|
320
|
-
lineNumber:
|
|
332
|
+
lineNumber: 563,
|
|
321
333
|
columnNumber: 43
|
|
322
334
|
}
|
|
323
335
|
}));
|
|
@@ -328,7 +340,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
328
340
|
__self: _this,
|
|
329
341
|
__source: {
|
|
330
342
|
fileName: _jsxFileName,
|
|
331
|
-
lineNumber:
|
|
343
|
+
lineNumber: 573,
|
|
332
344
|
columnNumber: 36
|
|
333
345
|
}
|
|
334
346
|
}), _react["default"].createElement(_ThemeContext.ThemeProvider, {
|
|
@@ -336,7 +348,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
336
348
|
__self: _this,
|
|
337
349
|
__source: {
|
|
338
350
|
fileName: _jsxFileName,
|
|
339
|
-
lineNumber:
|
|
351
|
+
lineNumber: 574,
|
|
340
352
|
columnNumber: 9
|
|
341
353
|
}
|
|
342
354
|
}, _react["default"].createElement(_reactNative.View, {
|
|
@@ -344,7 +356,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
344
356
|
__self: _this,
|
|
345
357
|
__source: {
|
|
346
358
|
fileName: _jsxFileName,
|
|
347
|
-
lineNumber:
|
|
359
|
+
lineNumber: 575,
|
|
348
360
|
columnNumber: 11
|
|
349
361
|
}
|
|
350
362
|
}, _react["default"].createElement(Message, {
|
|
@@ -360,7 +372,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
360
372
|
__self: _this,
|
|
361
373
|
__source: {
|
|
362
374
|
fileName: _jsxFileName,
|
|
363
|
-
lineNumber:
|
|
375
|
+
lineNumber: 576,
|
|
364
376
|
columnNumber: 13
|
|
365
377
|
}
|
|
366
378
|
}))), !shouldApplyAndroidWorkaround && (0, _useMessageList.isMessageWithStylesReadByAndDateSeparator)(message) && message.dateSeparator && _react["default"].createElement(InlineDateSeparator, {
|
|
@@ -368,14 +380,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
368
380
|
__self: _this,
|
|
369
381
|
__source: {
|
|
370
382
|
fileName: _jsxFileName,
|
|
371
|
-
lineNumber:
|
|
383
|
+
lineNumber: 593,
|
|
372
384
|
columnNumber: 36
|
|
373
385
|
}
|
|
374
386
|
}), insertInlineUnreadIndicator && _react["default"].createElement(InlineUnreadIndicator, {
|
|
375
387
|
__self: _this,
|
|
376
388
|
__source: {
|
|
377
389
|
fileName: _jsxFileName,
|
|
378
|
-
lineNumber:
|
|
390
|
+
lineNumber: 595,
|
|
379
391
|
columnNumber: 41
|
|
380
392
|
}
|
|
381
393
|
})) : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_reactNative.View, {
|
|
@@ -383,7 +395,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
383
395
|
__self: _this,
|
|
384
396
|
__source: {
|
|
385
397
|
fileName: _jsxFileName,
|
|
386
|
-
lineNumber:
|
|
398
|
+
lineNumber: 599,
|
|
387
399
|
columnNumber: 9
|
|
388
400
|
}
|
|
389
401
|
}, shouldApplyAndroidWorkaround && (0, _useMessageList.isMessageWithStylesReadByAndDateSeparator)(message) && message.dateSeparator && _react["default"].createElement(InlineDateSeparator, {
|
|
@@ -391,7 +403,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
391
403
|
__self: _this,
|
|
392
404
|
__source: {
|
|
393
405
|
fileName: _jsxFileName,
|
|
394
|
-
lineNumber:
|
|
406
|
+
lineNumber: 602,
|
|
395
407
|
columnNumber: 38
|
|
396
408
|
}
|
|
397
409
|
}), _react["default"].createElement(Message, {
|
|
@@ -407,7 +419,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
407
419
|
__self: _this,
|
|
408
420
|
__source: {
|
|
409
421
|
fileName: _jsxFileName,
|
|
410
|
-
lineNumber:
|
|
422
|
+
lineNumber: 603,
|
|
411
423
|
columnNumber: 11
|
|
412
424
|
}
|
|
413
425
|
})), !shouldApplyAndroidWorkaround && (0, _useMessageList.isMessageWithStylesReadByAndDateSeparator)(message) && message.dateSeparator && _react["default"].createElement(InlineDateSeparator, {
|
|
@@ -415,14 +427,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
415
427
|
__self: _this,
|
|
416
428
|
__source: {
|
|
417
429
|
fileName: _jsxFileName,
|
|
418
|
-
lineNumber:
|
|
430
|
+
lineNumber: 623,
|
|
419
431
|
columnNumber: 36
|
|
420
432
|
}
|
|
421
433
|
}), insertInlineUnreadIndicator && _react["default"].createElement(InlineUnreadIndicator, {
|
|
422
434
|
__self: _this,
|
|
423
435
|
__source: {
|
|
424
436
|
fileName: _jsxFileName,
|
|
425
|
-
lineNumber:
|
|
437
|
+
lineNumber: 625,
|
|
426
438
|
columnNumber: 41
|
|
427
439
|
}
|
|
428
440
|
}));
|
|
@@ -534,7 +546,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
534
546
|
if (isScrollAtEnd) {
|
|
535
547
|
maybeCallOnEndReached();
|
|
536
548
|
}
|
|
537
|
-
var isScrollAtBottom = offset <=
|
|
549
|
+
var isScrollAtBottom = offset <= 150;
|
|
538
550
|
var showScrollToBottomButton = !isScrollAtBottom || !hasNoMoreRecentMessagesToLoad;
|
|
539
551
|
var shouldMarkRead = !threadList && offset <= 0 && hasNoMoreRecentMessagesToLoad && channel.countUnread() > 0;
|
|
540
552
|
if (shouldMarkRead) {
|
|
@@ -621,16 +633,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
621
633
|
resetPaginationTrackersRef.current();
|
|
622
634
|
}, [messageList]);
|
|
623
635
|
(0, _react.useEffect)(function () {
|
|
624
|
-
if (scrollToDebounceTimeoutRef.current) clearTimeout(scrollToDebounceTimeoutRef.current);
|
|
625
636
|
scrollToDebounceTimeoutRef.current = setTimeout(function () {
|
|
626
|
-
|
|
637
|
+
if (initialScrollToFirstUnreadMessage) {
|
|
638
|
+
initialScrollSettingTimeoutRef.current = setTimeout(function () {
|
|
639
|
+
setInitialScrollDone(true);
|
|
640
|
+
}, 500);
|
|
641
|
+
}
|
|
627
642
|
var messageIdToScroll = messageIdToScrollToRef.current;
|
|
628
|
-
|
|
629
|
-
if (!initialScrollSet.current && initialScrollToFirstUnreadMessage && countUnread > scrollToFirstUnreadThreshold) {
|
|
630
|
-
if (messageList.length >= countUnread) {
|
|
631
|
-
messageIdToScroll = messageList[countUnread - 1].id;
|
|
632
|
-
}
|
|
633
|
-
} else if (targetedMessage && messageIdLastScrolledToRef.current !== targetedMessage) {
|
|
643
|
+
if (targetedMessage && messageIdLastScrolledToRef.current !== targetedMessage) {
|
|
634
644
|
messageIdToScroll = targetedMessage;
|
|
635
645
|
}
|
|
636
646
|
if (!messageIdToScroll) return;
|
|
@@ -645,14 +655,13 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
645
655
|
});
|
|
646
656
|
messageIdToScrollToRef.current = undefined;
|
|
647
657
|
messageIdLastScrolledToRef.current = messageIdToScroll;
|
|
648
|
-
if (!initialScrollSet.current && initialScrollToFirstUnreadMessage) {
|
|
649
|
-
initialScrollSet.current = true;
|
|
650
|
-
} else {
|
|
651
|
-
setTargetedMessage(messageIdToScroll);
|
|
652
|
-
}
|
|
653
658
|
}
|
|
654
659
|
}, 150);
|
|
655
|
-
|
|
660
|
+
return function () {
|
|
661
|
+
clearTimeout(scrollToDebounceTimeoutRef.current);
|
|
662
|
+
clearTimeout(initialScrollSettingTimeoutRef.current);
|
|
663
|
+
};
|
|
664
|
+
}, [targetedMessage, initialScrollToFirstUnreadMessage, messageList]);
|
|
656
665
|
var messagesWithImages = legacyImageViewerSwipeBehaviour && messageList.filter(function (message) {
|
|
657
666
|
var isMessageTypeDeleted = message.type === 'deleted';
|
|
658
667
|
if (!isMessageTypeDeleted && message.attachments) {
|
|
@@ -716,7 +725,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
716
725
|
__self: _this,
|
|
717
726
|
__source: {
|
|
718
727
|
fileName: _jsxFileName,
|
|
719
|
-
lineNumber:
|
|
728
|
+
lineNumber: 971,
|
|
720
729
|
columnNumber: 7
|
|
721
730
|
}
|
|
722
731
|
}, _react["default"].createElement(EmptyStateIndicator, {
|
|
@@ -724,7 +733,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
724
733
|
__self: _this,
|
|
725
734
|
__source: {
|
|
726
735
|
fileName: _jsxFileName,
|
|
727
|
-
lineNumber:
|
|
736
|
+
lineNumber: 975,
|
|
728
737
|
columnNumber: 9
|
|
729
738
|
}
|
|
730
739
|
}));
|
|
@@ -735,14 +744,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
735
744
|
__self: _this,
|
|
736
745
|
__source: {
|
|
737
746
|
fileName: _jsxFileName,
|
|
738
|
-
lineNumber:
|
|
747
|
+
lineNumber: 983,
|
|
739
748
|
columnNumber: 7
|
|
740
749
|
}
|
|
741
750
|
}, _react["default"].createElement(FooterComponent, {
|
|
742
751
|
__self: _this,
|
|
743
752
|
__source: {
|
|
744
753
|
fileName: _jsxFileName,
|
|
745
|
-
lineNumber:
|
|
754
|
+
lineNumber: 984,
|
|
746
755
|
columnNumber: 9
|
|
747
756
|
}
|
|
748
757
|
}));
|
|
@@ -753,14 +762,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
753
762
|
__self: _this,
|
|
754
763
|
__source: {
|
|
755
764
|
fileName: _jsxFileName,
|
|
756
|
-
lineNumber:
|
|
765
|
+
lineNumber: 992,
|
|
757
766
|
columnNumber: 7
|
|
758
767
|
}
|
|
759
768
|
}, _react["default"].createElement(HeaderComponent, {
|
|
760
769
|
__self: _this,
|
|
761
770
|
__source: {
|
|
762
771
|
fileName: _jsxFileName,
|
|
763
|
-
lineNumber:
|
|
772
|
+
lineNumber: 993,
|
|
764
773
|
columnNumber: 9
|
|
765
774
|
}
|
|
766
775
|
}));
|
|
@@ -772,7 +781,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
772
781
|
__self: _this,
|
|
773
782
|
__source: {
|
|
774
783
|
fileName: _jsxFileName,
|
|
775
|
-
lineNumber:
|
|
784
|
+
lineNumber: 1003,
|
|
776
785
|
columnNumber: 7
|
|
777
786
|
}
|
|
778
787
|
}, _react["default"].createElement(LoadingIndicator, {
|
|
@@ -780,7 +789,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
780
789
|
__self: _this,
|
|
781
790
|
__source: {
|
|
782
791
|
fileName: _jsxFileName,
|
|
783
|
-
lineNumber:
|
|
792
|
+
lineNumber: 1004,
|
|
784
793
|
columnNumber: 9
|
|
785
794
|
}
|
|
786
795
|
}));
|
|
@@ -792,7 +801,7 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
792
801
|
__self: _this,
|
|
793
802
|
__source: {
|
|
794
803
|
fileName: _jsxFileName,
|
|
795
|
-
lineNumber:
|
|
804
|
+
lineNumber: 1011,
|
|
796
805
|
columnNumber: 30
|
|
797
806
|
}
|
|
798
807
|
});
|
|
@@ -801,12 +810,19 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
801
810
|
__self: _this,
|
|
802
811
|
__source: {
|
|
803
812
|
fileName: _jsxFileName,
|
|
804
|
-
lineNumber:
|
|
813
|
+
lineNumber: 1012,
|
|
805
814
|
columnNumber: 46
|
|
806
815
|
}
|
|
807
816
|
});
|
|
808
817
|
return null;
|
|
809
818
|
};
|
|
819
|
+
var additionalFlatListPropsExcludingStyle;
|
|
820
|
+
if (additionalFlatListProps) {
|
|
821
|
+
var contentContainerStyle = additionalFlatListProps.contentContainerStyle,
|
|
822
|
+
style = additionalFlatListProps.style,
|
|
823
|
+
rest = (0, _objectWithoutProperties2["default"])(additionalFlatListProps, _excluded);
|
|
824
|
+
additionalFlatListPropsExcludingStyle = rest;
|
|
825
|
+
}
|
|
810
826
|
return _react["default"].createElement(_reactNative.View, {
|
|
811
827
|
style: [styles.container, {
|
|
812
828
|
backgroundColor: white_snow
|
|
@@ -815,12 +831,12 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
815
831
|
__self: _this,
|
|
816
832
|
__source: {
|
|
817
833
|
fileName: _jsxFileName,
|
|
818
|
-
lineNumber:
|
|
834
|
+
lineNumber: 1028,
|
|
819
835
|
columnNumber: 5
|
|
820
836
|
}
|
|
821
837
|
}, _react["default"].createElement(FlatList, (0, _extends2["default"])({
|
|
822
838
|
CellRendererComponent: shouldApplyAndroidWorkaround ? InvertedCellRendererComponent : undefined,
|
|
823
|
-
contentContainerStyle: [styles.contentContainer, contentContainer],
|
|
839
|
+
contentContainerStyle: [styles.contentContainer, additionalFlatListProps == null ? void 0 : additionalFlatListProps.contentContainerStyle, contentContainer],
|
|
824
840
|
data: messageList,
|
|
825
841
|
extraData: disabled || !hasNoMoreRecentMessagesToLoad,
|
|
826
842
|
inverted: shouldApplyAndroidWorkaround ? false : inverted,
|
|
@@ -844,14 +860,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
844
860
|
renderItem: renderItem,
|
|
845
861
|
scrollEnabled: overlay === 'none',
|
|
846
862
|
showsVerticalScrollIndicator: !shouldApplyAndroidWorkaround,
|
|
847
|
-
style: [styles.listContainer, listContainer, shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined],
|
|
863
|
+
style: [styles.listContainer, listContainer, additionalFlatListProps == null ? void 0 : additionalFlatListProps.style, shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined],
|
|
848
864
|
testID: "message-flat-list",
|
|
849
865
|
viewabilityConfig: flatListViewabilityConfig
|
|
850
|
-
},
|
|
866
|
+
}, additionalFlatListPropsExcludingStyle, {
|
|
851
867
|
__self: _this,
|
|
852
868
|
__source: {
|
|
853
869
|
fileName: _jsxFileName,
|
|
854
|
-
lineNumber:
|
|
870
|
+
lineNumber: 1032,
|
|
855
871
|
columnNumber: 7
|
|
856
872
|
}
|
|
857
873
|
})), !loading && _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_reactNative.View, {
|
|
@@ -859,28 +875,28 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
859
875
|
__self: _this,
|
|
860
876
|
__source: {
|
|
861
877
|
fileName: _jsxFileName,
|
|
862
|
-
lineNumber:
|
|
878
|
+
lineNumber: 1077,
|
|
863
879
|
columnNumber: 11
|
|
864
880
|
}
|
|
865
881
|
}, _react["default"].createElement(StickyHeaderComponent, {
|
|
866
882
|
__self: _this,
|
|
867
883
|
__source: {
|
|
868
884
|
fileName: _jsxFileName,
|
|
869
|
-
lineNumber:
|
|
885
|
+
lineNumber: 1078,
|
|
870
886
|
columnNumber: 13
|
|
871
887
|
}
|
|
872
888
|
})), !disableTypingIndicator && TypingIndicator && _react["default"].createElement(TypingIndicatorContainer, {
|
|
873
889
|
__self: _this,
|
|
874
890
|
__source: {
|
|
875
891
|
fileName: _jsxFileName,
|
|
876
|
-
lineNumber:
|
|
892
|
+
lineNumber: 1081,
|
|
877
893
|
columnNumber: 13
|
|
878
894
|
}
|
|
879
895
|
}, _react["default"].createElement(TypingIndicator, {
|
|
880
896
|
__self: _this,
|
|
881
897
|
__source: {
|
|
882
898
|
fileName: _jsxFileName,
|
|
883
|
-
lineNumber:
|
|
899
|
+
lineNumber: 1082,
|
|
884
900
|
columnNumber: 15
|
|
885
901
|
}
|
|
886
902
|
})), _react["default"].createElement(ScrollToBottomButton, {
|
|
@@ -890,14 +906,14 @@ var MessageListWithContext = function MessageListWithContext(props) {
|
|
|
890
906
|
__self: _this,
|
|
891
907
|
__source: {
|
|
892
908
|
fileName: _jsxFileName,
|
|
893
|
-
lineNumber:
|
|
909
|
+
lineNumber: 1085,
|
|
894
910
|
columnNumber: 11
|
|
895
911
|
}
|
|
896
912
|
})), _react["default"].createElement(NetworkDownIndicator, {
|
|
897
913
|
__self: _this,
|
|
898
914
|
__source: {
|
|
899
915
|
fileName: _jsxFileName,
|
|
900
|
-
lineNumber:
|
|
916
|
+
lineNumber: 1092,
|
|
901
917
|
columnNumber: 7
|
|
902
918
|
}
|
|
903
919
|
}));
|
|
@@ -1004,7 +1020,7 @@ var MessageList = function MessageList(props) {
|
|
|
1004
1020
|
__self: _this,
|
|
1005
1021
|
__source: {
|
|
1006
1022
|
fileName: _jsxFileName,
|
|
1007
|
-
lineNumber:
|
|
1023
|
+
lineNumber: 1150,
|
|
1008
1024
|
columnNumber: 5
|
|
1009
1025
|
}
|
|
1010
1026
|
}));
|