stream-chat-react-native-core 8.13.6 → 8.13.8
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 +0 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js +2 -2
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +1 -0
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +0 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js +2 -2
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +1 -0
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/Channel/Channel.tsx +1 -1
- package/src/components/ChannelPreview/hooks/useChannelPreviewData.ts +2 -2
- package/src/components/Chat/Chat.tsx +1 -0
- package/src/version.json +1 -1
|
@@ -1102,7 +1102,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
|
|
|
1102
1102
|
const parentID = thread.id;
|
|
1103
1103
|
|
|
1104
1104
|
const limit = 50;
|
|
1105
|
-
channel.state.threads[parentID] = [];
|
|
1105
|
+
// channel.state.threads[parentID] = [];
|
|
1106
1106
|
const queryResponse = await channel.getReplies(parentID, {
|
|
1107
1107
|
limit,
|
|
1108
1108
|
});
|
|
@@ -25,7 +25,7 @@ export const useChannelPreviewData = (
|
|
|
25
25
|
) => {
|
|
26
26
|
const [forceUpdate, setForceUpdate] = useState(0);
|
|
27
27
|
const [lastMessage, setLastMessageInner] = useState<LastMessageType>(
|
|
28
|
-
() => channel.state.
|
|
28
|
+
() => channel.state.latestMessages[channel.state.latestMessages.length - 1],
|
|
29
29
|
);
|
|
30
30
|
const throttledSetLastMessage = useMemo(
|
|
31
31
|
() =>
|
|
@@ -44,7 +44,7 @@ export const useChannelPreviewData = (
|
|
|
44
44
|
const { forceUpdate: contextForceUpdate } = useChannelsContext();
|
|
45
45
|
const channelListForceUpdate = forceUpdateOverride ?? contextForceUpdate;
|
|
46
46
|
|
|
47
|
-
const channelLastMessage = channel.
|
|
47
|
+
const channelLastMessage = channel.state.latestMessages[channel.state.latestMessages.length - 1];
|
|
48
48
|
const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;
|
|
49
49
|
|
|
50
50
|
const refreshUnreadCount = useMemo(
|
|
@@ -191,6 +191,7 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
|
|
|
191
191
|
client.deviceIdentifier = { os: `${Platform.OS} ${Platform.Version}` };
|
|
192
192
|
// This is to disable recovery related logic in js client, since we handle it in this SDK
|
|
193
193
|
client.recoverStateOnReconnect = false;
|
|
194
|
+
client.preventThreadCleanup = true;
|
|
194
195
|
client.persistUserOnConnectionFailure = enableOfflineSupport;
|
|
195
196
|
}
|
|
196
197
|
|
package/src/version.json
CHANGED