stream-chat-react 13.5.0 → 13.5.1
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.
|
@@ -148,10 +148,6 @@ export const useChannelListShapeDefaults = () => {
|
|
|
148
148
|
lastPinnedChannelIndex = findLastPinnedChannelIndex({ channels: newChannels });
|
|
149
149
|
}
|
|
150
150
|
const newTargetChannelIndex = typeof lastPinnedChannelIndex === 'number' ? lastPinnedChannelIndex + 1 : 0;
|
|
151
|
-
// skip re-render if the position of the channel does not change
|
|
152
|
-
if (currentChannels[newTargetChannelIndex] === targetChannel) {
|
|
153
|
-
return currentChannels;
|
|
154
|
-
}
|
|
155
151
|
newChannels.splice(newTargetChannelIndex, 0, targetChannel);
|
|
156
152
|
return newChannels;
|
|
157
153
|
});
|
|
@@ -24,7 +24,7 @@ export const useChat = ({ client, defaultLanguage = 'en', i18nInstance, initialN
|
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (!client)
|
|
26
26
|
return;
|
|
27
|
-
const version = "13.5.
|
|
27
|
+
const version = "13.5.1";
|
|
28
28
|
const userAgent = client.getUserAgent();
|
|
29
29
|
if (!userAgent.includes('stream-chat-react')) {
|
|
30
30
|
// result looks like: 'stream-chat-react-2.3.2-stream-chat-javascript-client-browser-2.2.2'
|
package/dist/index.browser.cjs
CHANGED
|
@@ -3971,9 +3971,6 @@ var useChannelListShapeDefaults = () => {
|
|
|
3971
3971
|
lastPinnedChannelIndex = findLastPinnedChannelIndex({ channels: newChannels });
|
|
3972
3972
|
}
|
|
3973
3973
|
const newTargetChannelIndex = typeof lastPinnedChannelIndex === "number" ? lastPinnedChannelIndex + 1 : 0;
|
|
3974
|
-
if (currentChannels[newTargetChannelIndex] === targetChannel) {
|
|
3975
|
-
return currentChannels;
|
|
3976
|
-
}
|
|
3977
3974
|
newChannels.splice(newTargetChannelIndex, 0, targetChannel);
|
|
3978
3975
|
return newChannels;
|
|
3979
3976
|
});
|
|
@@ -35896,7 +35893,7 @@ var useChat = ({
|
|
|
35896
35893
|
};
|
|
35897
35894
|
(0, import_react279.useEffect)(() => {
|
|
35898
35895
|
if (!client) return;
|
|
35899
|
-
const version = "13.5.
|
|
35896
|
+
const version = "13.5.1";
|
|
35900
35897
|
const userAgent = client.getUserAgent();
|
|
35901
35898
|
if (!userAgent.includes("stream-chat-react")) {
|
|
35902
35899
|
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
|