Skip to content

Commit d419f8c

Browse files
committed
Merge branch 'v3.0.0-beta.2' of https://github.com/GetStream/stream-chat-react-native into v4.0.0-beta.2
2 parents 1470449 + c9d9211 commit d419f8c

35 files changed

+382
-124
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Channel muted status component rendered within [`Preview`](../../../../ui-components/channel_preview_muted_status.mdx).
2+
3+
| Type | Default |
4+
| --------- | --------------------------------------------------------------------------------------- |
5+
| component | [ChannelPreviewMutedStatus](../../../../ui-components/channel_preview_muted_status.mdx) |

docusaurus/docs/reactnative/core-components/channel_list.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import LoadingIndicator from '../common-content/core-components/channel-list/pro
3737
import Preview from '../common-content/core-components/channel-list/props/preview.mdx';
3838
import PreviewAvatar from '../common-content/core-components/channel-list/props/preview_avatar.mdx';
3939
import PreviewMessage from '../common-content/core-components/channel-list/props/preview_message.mdx';
40+
import PreviewMutedStatus from '../common-content/core-components/channel-list/props/preview_muted_status.mdx';
4041
import PreviewStatus from '../common-content/core-components/channel-list/props/preview_status.mdx';
4142
import PreviewTitle from '../common-content/core-components/channel-list/props/preview_title.mdx';
4243
import PreviewUnreadCount from '../common-content/core-components/channel-list/props/preview_unread_count.mdx';
@@ -236,6 +237,10 @@ const CustomPreviewTitle = ({ channel }) => (
236237

237238
<PreviewMessage />
238239

240+
### PreviewMutedStatus
241+
242+
<PreviewMutedStatus />
243+
239244
### PreviewStatus
240245

241246
<PreviewStatus />
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
id: channel-preview-muted_status
3+
title: ChannelPreviewMutedStatus
4+
---
5+
6+
import Channel from '../common-content/ui-components/channel-preview-messenger/props/channel.mdx';
7+
8+
Component to render the muted status for a channel, within the [`ChannelList`](../core-components/channel_list.mdx) component.
9+
This is the default component provided to the prop [`PreviewMutedStatus`](../core-components/channel_list.mdx#previewmutedstatus) on the `ChannelList` component.
10+
11+
## Props
12+
13+
### <div class="label required">required</div> **channel**
14+
15+
<Channel />
16+
17+
### <div class="label required">required</div> **muted**
18+
19+
Value which stores the muted status of the Channel
20+
21+
| Type |
22+
| ------- |
23+
| boolean |

docusaurus/docs/reactnative/ui-components/channel_preview_title.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Formatted name for the previewed channel.
1818
| ------ |
1919
| string |
2020

21-
### channel
21+
### <div class="label required">required</div> **channel**
2222

2323
<Channel />

docusaurus/reactnative_versioned_docs/version-3.x.x/common-content/core-components/channel/props/input.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Component to render UI part of enclosed MessageInput component.
2-
Please read section in guides about [Custimizing Message Input](/reactnative/guides/message-input).
2+
Please read section in guides about [Customizing Message Input](/reactnative/guides/message-input-customization).
33

44
| Type |
55
| --------- |

examples/ExpoMessaging/yarn.lock

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,13 @@
11961196
dependencies:
11971197
regenerator-runtime "^0.13.4"
11981198

1199+
"@babel/runtime@^7.16.3":
1200+
version "7.16.7"
1201+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
1202+
integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==
1203+
dependencies:
1204+
regenerator-runtime "^0.13.4"
1205+
11991206
"@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.8.6":
12001207
version "7.12.13"
12011208
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327"
@@ -1782,6 +1789,13 @@
17821789
dependencies:
17831790
"@types/node" "*"
17841791

1792+
"@types/jsonwebtoken@^8.5.6":
1793+
version "8.5.7"
1794+
resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.7.tgz#e5dd6832215c48f61c8b79cb1747abc97a337367"
1795+
integrity sha512-CBHN+1unePowgS94ayLE7aVp7AfyhgG/3l2O+AjkhOMY4kAAfVI1OnbbLnOeDMAdTNLP5ZjJ3kdZanRtRQaK3Q==
1796+
dependencies:
1797+
"@types/node" "*"
1798+
17851799
"@types/node@*":
17861800
version "15.6.1"
17871801
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08"
@@ -2121,6 +2135,13 @@ axios@^0.21.1:
21212135
dependencies:
21222136
follow-redirects "^1.10.0"
21232137

2138+
axios@^0.22.0:
2139+
version "0.22.0"
2140+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25"
2141+
integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w==
2142+
dependencies:
2143+
follow-redirects "^1.14.4"
2144+
21242145
babel-plugin-dynamic-import-node@^2.3.3:
21252146
version "2.3.3"
21262147
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3"
@@ -3500,6 +3521,11 @@ follow-redirects@^1.10.0:
35003521
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43"
35013522
integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==
35023523

3524+
follow-redirects@^1.14.4:
3525+
version "1.14.7"
3526+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
3527+
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
3528+
35033529
fontfaceobserver@^2.1.0:
35043530
version "2.1.0"
35053531
resolved "https://registry.yarnpkg.com/fontfaceobserver/-/fontfaceobserver-2.1.0.tgz#e2705d293e2c585a6531c2a722905657317a2991"
@@ -6177,15 +6203,15 @@ [email protected]:
61776203
version "0.0.0"
61786204
uid ""
61796205

6180-
stream-chat@^4.4.3:
6181-
version "4.4.3"
6182-
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-4.4.3.tgz#611b9fe21109e558d1611f08cd04be3f52f6b9c9"
6183-
integrity sha512-f6/W7EMvul4LkBxCVvF7mwmQ7TVW4hB+v6dTWvPP7CJMGkSAahf6lbAyDYkKZFwtMXxr5L7cvXtG9NHaNU/3AA==
6206+
stream-chat@^5.1.2:
6207+
version "5.1.2"
6208+
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-5.1.2.tgz#c55d3078505d957a6b0db18e3af25ebbec7b8746"
6209+
integrity sha512-Hqxj6iJdV10YG2hZXRhkVtVm6lEUuRK+AuTmtw639CTo3RokQiBTZ7+hYCqayhIFAX2Lrt6Drfqiol8lmcreag==
61846210
dependencies:
6185-
"@babel/runtime" "^7.13.10"
6186-
"@types/jsonwebtoken" "^8.5.0"
6211+
"@babel/runtime" "^7.16.3"
6212+
"@types/jsonwebtoken" "^8.5.6"
61876213
"@types/ws" "^7.4.0"
6188-
axios "^0.21.1"
6214+
axios "^0.22.0"
61896215
base64-js "^1.5.1"
61906216
form-data "^4.0.0"
61916217
isomorphic-ws "^4.0.1"

examples/NativeMessaging/yarn.lock

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,13 @@
897897
dependencies:
898898
regenerator-runtime "^0.13.4"
899899

900+
"@babel/runtime@^7.16.3":
901+
version "7.16.7"
902+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
903+
integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==
904+
dependencies:
905+
regenerator-runtime "^0.13.4"
906+
900907
"@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.3.3":
901908
version "7.12.13"
902909
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327"
@@ -1585,6 +1592,13 @@
15851592
dependencies:
15861593
"@types/node" "*"
15871594

1595+
"@types/jsonwebtoken@^8.5.6":
1596+
version "8.5.7"
1597+
resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.7.tgz#e5dd6832215c48f61c8b79cb1747abc97a337367"
1598+
integrity sha512-CBHN+1unePowgS94ayLE7aVp7AfyhgG/3l2O+AjkhOMY4kAAfVI1OnbbLnOeDMAdTNLP5ZjJ3kdZanRtRQaK3Q==
1599+
dependencies:
1600+
"@types/node" "*"
1601+
15881602
"@types/node@*":
15891603
version "15.6.1"
15901604
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08"
@@ -2005,6 +2019,13 @@ axios@^0.21.1:
20052019
dependencies:
20062020
follow-redirects "^1.10.0"
20072021

2022+
axios@^0.22.0:
2023+
version "0.22.0"
2024+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25"
2025+
integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w==
2026+
dependencies:
2027+
follow-redirects "^1.14.4"
2028+
20082029
babel-core@^7.0.0-bridge.0:
20092030
version "7.0.0-bridge.0"
20102031
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
@@ -3482,6 +3503,11 @@ follow-redirects@^1.10.0:
34823503
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43"
34833504
integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==
34843505

3506+
follow-redirects@^1.14.4:
3507+
version "1.14.7"
3508+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
3509+
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
3510+
34853511
for-in@^1.0.2:
34863512
version "1.0.2"
34873513
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -6959,15 +6985,15 @@ [email protected]:
69596985
version "0.0.0"
69606986
uid ""
69616987

6962-
stream-chat@^4.4.3:
6963-
version "4.4.3"
6964-
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-4.4.3.tgz#611b9fe21109e558d1611f08cd04be3f52f6b9c9"
6965-
integrity sha512-f6/W7EMvul4LkBxCVvF7mwmQ7TVW4hB+v6dTWvPP7CJMGkSAahf6lbAyDYkKZFwtMXxr5L7cvXtG9NHaNU/3AA==
6988+
stream-chat@^5.1.2:
6989+
version "5.1.2"
6990+
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-5.1.2.tgz#c55d3078505d957a6b0db18e3af25ebbec7b8746"
6991+
integrity sha512-Hqxj6iJdV10YG2hZXRhkVtVm6lEUuRK+AuTmtw639CTo3RokQiBTZ7+hYCqayhIFAX2Lrt6Drfqiol8lmcreag==
69666992
dependencies:
6967-
"@babel/runtime" "^7.13.10"
6968-
"@types/jsonwebtoken" "^8.5.0"
6993+
"@babel/runtime" "^7.16.3"
6994+
"@types/jsonwebtoken" "^8.5.6"
69696995
"@types/ws" "^7.4.0"
6970-
axios "^0.21.1"
6996+
axios "^0.22.0"
69716997
base64-js "^1.5.1"
69726998
form-data "^4.0.0"
69736999
isomorphic-ws "^4.0.1"

examples/SampleApp/App.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,19 @@ const App = () => {
8282
);
8383
};
8484

85-
const DrawerNavigator: React.FC = () => {
86-
const { overlay } = useOverlayContext();
87-
88-
return (
89-
<Drawer.Navigator
90-
drawerContent={(props) => <MenuDrawer {...props} />}
91-
drawerStyle={{
92-
width: 300,
93-
}}
94-
screenOptions={{
95-
gestureEnabled: Platform.OS === 'ios' && overlay === 'none',
96-
}}
97-
>
98-
<Drawer.Screen component={HomeScreen} name='HomeScreen' options={{ headerShown: false }} />
99-
</Drawer.Navigator>
100-
);
101-
};
85+
const DrawerNavigator: React.FC = () => (
86+
<Drawer.Navigator
87+
drawerContent={(props) => <MenuDrawer {...props} />}
88+
drawerStyle={{
89+
width: 300,
90+
}}
91+
screenOptions={{
92+
gestureEnabled: true,
93+
}}
94+
>
95+
<Drawer.Screen component={HomeScreen} name='HomeScreen' options={{ headerShown: false }} />
96+
</Drawer.Navigator>
97+
);
10298

10399
const DrawerNavigatorWrapper: React.FC<{
104100
chatClient: StreamChat<

examples/SampleApp/src/components/ChatScreenHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React, { useContext } from 'react';
1+
import React from 'react';
22
import { Image, StyleSheet, TouchableOpacity } from 'react-native';
33
import { CompositeNavigationProp, useNavigation } from '@react-navigation/native';
44
import { useChatContext, useTheme } from 'stream-chat-react-native';
55

66
import { RoundButton } from './RoundButton';
77
import { ScreenHeader } from './ScreenHeader';
88

9-
import { AppContext } from '../context/AppContext';
9+
import { useAppContext } from '../context/AppContext';
1010
import { NewDirectMessageIcon } from '../icons/NewDirectMessageIcon';
1111

1212
import type { DrawerNavigationProp } from '@react-navigation/drawer';
@@ -36,7 +36,7 @@ export const ChatScreenHeader: React.FC<{ title?: string }> = ({ title = 'Stream
3636
} = useTheme();
3737

3838
const navigation = useNavigation<ChatScreenHeaderNavigationProp>();
39-
const { chatClient } = useContext(AppContext);
39+
const { chatClient } = useAppContext();
4040
const { isOnline } = useChatContext();
4141

4242
return (

examples/SampleApp/src/components/UnreadCountBadge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { useContext, useEffect, useState } from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { StyleSheet, Text, View } from 'react-native';
33
import { isOwnUser } from 'stream-chat';
44
import { useTheme } from 'stream-chat-react-native';
55

6-
import { AppContext } from '../context/AppContext';
6+
import { useAppContext } from '../context/AppContext';
77

88
const styles = StyleSheet.create({
99
unreadContainer: {
@@ -27,7 +27,7 @@ export const UnreadCountBadge: React.FC = () => {
2727
},
2828
} = useTheme();
2929

30-
const { chatClient } = useContext(AppContext);
30+
const { chatClient } = useAppContext();
3131
const [count, setCount] = useState<number>();
3232

3333
useEffect(() => {

0 commit comments

Comments
 (0)