Skip to content

Commit 5d4c902

Browse files
committed
Merge branch 'develop' of https://github.com/GetStream/stream-chat-react-native into develop
2 parents 30b93e5 + 9a7cfa9 commit 5d4c902

File tree

5 files changed

+127
-23
lines changed

5 files changed

+127
-23
lines changed

docs/index.html

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,47 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7-
<title>Stream Chat React Native - Docs</title>
7+
<title>DEPRECATED Stream Chat React Native - Docs DEPRECATED</title>
88
<link rel="icon" type="image/x-icon" href="https://getstream.imgix.net/images/favicons/favicon-96x96.png">
9+
<style>
10+
.deprecationBanner {
11+
position: fixed;
12+
right: 0;
13+
left: 210px;
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
justify-content: center;
18+
background-color: #ae423f;
19+
}
20+
21+
.deprecationText, a {
22+
color: #fff;
23+
font-weight: bold;
24+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
25+
}
26+
27+
a {
28+
color: #78d4fc;
29+
font-size: 1.5rem;
30+
padding: 20px 0;
31+
}
32+
33+
34+
@media only screen and (max-width: 600px){
35+
.deprecationBanner {
36+
left: 0;
37+
}
38+
39+
}
40+
</style>
941
</head>
1042
<body>
43+
<div class='deprecationBanner'>
44+
<h1 class='deprecationText'>⚠️ This Documentation is Deprecated ⚠️</h1>
45+
<a href='https://getstream.io/chat/docs/sdk/reactnative/'>Click here to consult our new docs</a>
46+
</div>
1147
<div id="rsg-root"></div>
1248
<script src="build/bundle.38535de9.js"></script>
1349
</body>
14-
</html>
50+
</html>

docs/v3/index.html

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,50 @@
11
<!DOCTYPE html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7-
<title>Stream Chat React Native - Docs</title>
8-
<link rel="icon" type="image/x-icon" href="https://getstream.imgix.net/images/favicons/favicon-96x96.png">
9-
</head>
10-
<body>
11-
<div id="rsg-root"></div>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>DEPRECATED Stream Chat React Native - Docs DEPRECATED</title>
8+
<link rel="icon" type="image/x-icon" href="https://getstream.imgix.net/images/favicons/favicon-96x96.png">
9+
<style>
10+
.deprecationBanner {
11+
position: fixed;
12+
right: 0;
13+
left: 210px;
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
justify-content: center;
18+
background-color: #ae423f;
19+
}
20+
21+
.deprecationText, a {
22+
color: #fff;
23+
font-weight: bold;
24+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
25+
}
26+
27+
a {
28+
color: #78d4fc;
29+
font-size: 1.5rem;
30+
padding: 20px 0;
31+
}
32+
33+
34+
@media only screen and (max-width: 600px){
35+
.deprecationBanner {
36+
left: 0;
37+
}
38+
39+
}
40+
</style>
41+
</head>
42+
<body>
43+
<div class='deprecationBanner'>
44+
<h1 class='deprecationText'>⚠️ This Documentation is Deprecated ⚠️</h1>
45+
<a href='https://getstream.io/chat/docs/sdk/reactnative/'>Click here to consult our new docs</a>
46+
</div>
47+
<div id="rsg-root"></div>
1248
<script src="build/bundle.a39375a1.js"></script>
1349
</body>
14-
</html>
50+
</html>

docusaurus/docs/reactnative/guides/push_notifications_v2.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Easiest way to integrate push notifications in your Chat applications is using F
2727

2828
:::note
2929

30-
- If you would like to get push notifications only when users are offline, please contact [email protected].
3130
- Push notifications require membership. Watching a channel isn't enough.
3231

3332
:::
@@ -463,6 +462,11 @@ notifee.onBackgroundEvent(async ({ detail, type }) => {
463462
464463
The `notification_template` is a JSON object that includes the keys relevant to push notifications for Android. See the [AndroidNotification](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification) type in the firebase documentation for all the supported keys.
465464
465+
:::
466+
:::caution
467+
468+
We do not recommend doing this. If `notification_template` is added, then notifications will be shown in the foreground for Android. iOS will, by default, not show any notifications in the foreground. Generally, chat applications do not show push notifications in the foreground. This is why we do not recommend it. However, if you want foreground notifications in both platforms, please follow the steps mentioned in the [display-notification-in-foreground](#display-notification-in-foreground) section.
469+
466470
:::
467471
468472
### Show badge number on the iOS app

package/src/components/MessageInput/ImageUploadPreview.tsx

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import React from 'react';
2-
import { FlatList, Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
2+
import {
3+
FlatList,
4+
Image,
5+
StyleSheet,
6+
Text,
7+
TouchableOpacity,
8+
TouchableOpacityProps,
9+
View,
10+
} from 'react-native';
311

412
import { UploadProgressIndicator } from './UploadProgressIndicator';
513

@@ -87,9 +95,8 @@ const ImageUploadPreviewWithContext = <
8795

8896
const {
8997
theme: {
90-
colors: { overlay, white },
9198
messageInput: {
92-
imageUploadPreview: { dismiss, flatList, itemContainer, upload },
99+
imageUploadPreview: { flatList, itemContainer, upload },
93100
},
94101
},
95102
} = useTheme();
@@ -140,15 +147,11 @@ const ImageUploadPreviewWithContext = <
140147
style={[styles.upload, upload]}
141148
/>
142149
</UploadProgressIndicator>
143-
<TouchableOpacity
150+
<DismissUpload
144151
onPress={() => {
145152
removeImage(item.id);
146153
}}
147-
style={[styles.dismiss, { backgroundColor: overlay }, dismiss]}
148-
testID='remove-image-upload-preview'
149-
>
150-
<Close pathFill={white} />
151-
</TouchableOpacity>
154+
/>
152155
<UnsupportedImageTypeIndicator indicatorType={indicatorType} />
153156
</View>
154157
);
@@ -170,6 +173,29 @@ const ImageUploadPreviewWithContext = <
170173
) : null;
171174
};
172175

176+
type DismissUploadProps = Pick<TouchableOpacityProps, 'onPress'>;
177+
178+
const DismissUpload = ({ onPress }: DismissUploadProps) => {
179+
const {
180+
theme: {
181+
colors: { overlay, white },
182+
messageInput: {
183+
imageUploadPreview: { dismiss, dismissIconColor },
184+
},
185+
},
186+
} = useTheme();
187+
188+
return (
189+
<TouchableOpacity
190+
onPress={onPress}
191+
style={[styles.dismiss, { backgroundColor: overlay }, dismiss]}
192+
testID='remove-image-upload-preview'
193+
>
194+
<Close pathFill={dismissIconColor || white} />
195+
</TouchableOpacity>
196+
);
197+
};
198+
173199
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
174200
prevProps: ImageUploadPreviewPropsWithContext<StreamChatGenerics>,
175201
nextProps: ImageUploadPreviewPropsWithContext<StreamChatGenerics>,

package/src/contexts/themeContext/utils/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ export type Theme = {
267267
};
268268
imageUploadPreview: {
269269
dismiss: ViewStyle;
270+
dismissIconColor: Color;
270271
flatList: ViewStyle;
271272
itemContainer: ViewStyle;
272273
upload: ImageStyle;
@@ -766,6 +767,7 @@ export const defaultTheme: Theme = {
766767
},
767768
imageUploadPreview: {
768769
dismiss: {},
770+
dismissIconColor: '',
769771
flatList: {},
770772
itemContainer: {},
771773
upload: {},

0 commit comments

Comments
 (0)