stream-chat-react-native-core 5.9.0 → 5.9.1-beta.2
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 +26 -21
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +26 -21
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/package.json +1 -1
- package/src/components/Channel/Channel.tsx +17 -13
- package/src/version.json +1 -1
package/lib/module/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.9.
|
|
4
|
+
"version": "5.9.1-beta.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -35,8 +35,8 @@ import { useCreateTypingContext } from './hooks/useCreateTypingContext';
|
|
|
35
35
|
import { useTargetedMessage } from './hooks/useTargetedMessage';
|
|
36
36
|
|
|
37
37
|
import { ChannelContextValue, ChannelProvider } from '../../contexts/channelContext/ChannelContext';
|
|
38
|
-
import { useChannelState } from '../../contexts/channelsStateContext/useChannelState';
|
|
39
38
|
import type { UseChannelStateValue } from '../../contexts/channelsStateContext/useChannelState';
|
|
39
|
+
import { useChannelState } from '../../contexts/channelsStateContext/useChannelState';
|
|
40
40
|
import { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';
|
|
41
41
|
import {
|
|
42
42
|
InputMessageInputContextValue,
|
|
@@ -771,25 +771,29 @@ const ChannelWithContext = <
|
|
|
771
771
|
const channelSubscriptions: Array<ReturnType<ChannelType['on']>> = [];
|
|
772
772
|
const clientSubscriptions: Array<ReturnType<StreamChat['on']>> = [];
|
|
773
773
|
|
|
774
|
-
|
|
775
|
-
if (!channel) return;
|
|
774
|
+
if (!channel) return;
|
|
776
775
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
776
|
+
clientSubscriptions.push(
|
|
777
|
+
client.on('channel.deleted', (event) => {
|
|
778
|
+
if (event.cid === channel.cid) {
|
|
779
|
+
setDeleted(true);
|
|
780
|
+
}
|
|
781
|
+
}),
|
|
782
|
+
);
|
|
783
|
+
|
|
784
|
+
if (enableOfflineSupport) {
|
|
781
785
|
clientSubscriptions.push(DBSyncManager.onSyncStatusChange(connectionChangedHandler));
|
|
786
|
+
} else {
|
|
782
787
|
clientSubscriptions.push(
|
|
783
|
-
client.on('
|
|
784
|
-
if (event.
|
|
785
|
-
|
|
788
|
+
client.on('connection.changed', (event) => {
|
|
789
|
+
if (event.online) {
|
|
790
|
+
connectionChangedHandler();
|
|
786
791
|
}
|
|
787
792
|
}),
|
|
788
793
|
);
|
|
789
|
-
|
|
790
|
-
};
|
|
794
|
+
}
|
|
791
795
|
|
|
792
|
-
|
|
796
|
+
channelSubscriptions.push(channel.on(handleEvent));
|
|
793
797
|
|
|
794
798
|
return () => {
|
|
795
799
|
clientSubscriptions.forEach((s) => s.unsubscribe());
|
package/src/version.json
CHANGED