Skip to content

Commit 7db4ba6

Browse files
authored
Merge pull request #3265 from GetStream/develop
Next Release
2 parents 7b7ad2e + 54ea9ef commit 7db4ba6

File tree

43 files changed

+195
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+195
-55
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![NPM](https://img.shields.io/npm/v/stream-chat-react-native.svg)](https://www.npmjs.com/package/stream-chat-react-native)
1111
[![Build Status](https://github.com/GetStream/stream-chat-react-native/actions/workflows/release.yml/badge.svg)](https://github.com/GetStream/stream-chat-react-native/actions)
1212
[![Component Reference](https://img.shields.io/badge/docs-component%20reference-blue.svg)](https://getstream.io/chat/docs/sdk/reactnative)
13-
![JS Bundle Size](https://img.shields.io/badge/js_bundle_size-290%20KB-blue)
13+
![JS Bundle Size](https://img.shields.io/badge/js_bundle_size-291%20KB-blue)
1414

1515
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/[email protected]?auto=format,enhance" width="50%" />
1616

examples/ExpoMessaging/app/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Alert, Image, Pressable, StyleSheet, View } from 'react-native';
2-
import { ChannelList } from 'stream-chat-expo';
2+
import { ChannelList, SqliteClient } from 'stream-chat-expo';
33
import { useCallback, useContext, useMemo } from 'react';
44
import { Stack, useRouter } from 'expo-router';
55
import { ChannelSort } from 'stream-chat';
@@ -19,7 +19,13 @@ const LogoutButton = () => {
1919
const onLogoutHandler = useCallback(() => {
2020
Alert.alert('Logout', 'Are you sure you want to logout?', [
2121
{ text: 'Cancel', style: 'cancel' },
22-
{ text: 'Logout', onPress: logOut },
22+
{
23+
text: 'Logout',
24+
onPress: () => {
25+
SqliteClient.resetDB();
26+
logOut();
27+
},
28+
},
2329
]);
2430
}, [logOut]);
2531

examples/ExpoMessaging/components/ChatWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const ChatWrapper = ({ children }: PropsWithChildren<{}>) => {
4646

4747
return (
4848
<OverlayProvider i18nInstance={streami18n} value={{ style: theme }}>
49-
<Chat client={chatClient} i18nInstance={streami18n}>
49+
<Chat client={chatClient} i18nInstance={streami18n} enableOfflineSupport>
5050
{children}
5151
</Chat>
5252
</OverlayProvider>

examples/SampleApp/src/utils/messageActions.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Alert } from 'react-native';
22
import { StreamChat } from 'stream-chat';
33
import {
44
Colors,
5+
Delete,
56
messageActions,
67
MessageActionsParams,
78
Time,
@@ -20,7 +21,7 @@ export function channelMessageActions({
2021
t: TranslationContextValue['t'];
2122
colors?: typeof Colors;
2223
}) {
23-
const { dismissOverlay } = params;
24+
const { dismissOverlay, deleteForMeMessage } = params;
2425
const actions = messageActions(params);
2526

2627
// We cannot use the useMessageReminder hook here because it is a hook.
@@ -88,6 +89,27 @@ export function channelMessageActions({
8889
title: reminder ? 'Remove Reminder' : 'Remind Me',
8990
icon: <Bell height={24} width={24} />,
9091
});
92+
actions.push({
93+
action: async () => {
94+
Alert.alert('Delete for me', 'Are you sure you want to delete this message for me?', [
95+
{
96+
text: 'Cancel',
97+
style: 'cancel',
98+
},
99+
{
100+
text: 'Delete',
101+
onPress: async () => {
102+
await deleteForMeMessage?.action();
103+
dismissOverlay();
104+
},
105+
style: 'destructive',
106+
},
107+
]);
108+
},
109+
actionType: 'deleteForMe',
110+
icon: <Delete fill={colors?.accent_red} size={24} />,
111+
title: t('Delete for me'),
112+
});
91113

92114
return actions;
93115
}

examples/TypeScriptMessaging/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3248,4 +3248,4 @@ SPEC CHECKSUMS:
32483248

32493249
PODFILE CHECKSUM: 6b7a4b74915b42bfe4ffddaf67cbf5e7a2bfeab3
32503250

3251-
COCOAPODS: 1.16.2
3251+
COCOAPODS: 1.14.3

examples/TypeScriptMessaging/yarn.lock

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2734,6 +2734,15 @@ available-typed-arrays@^1.0.7:
27342734
dependencies:
27352735
possible-typed-array-names "^1.0.0"
27362736

2737+
axios@^1.12.2:
2738+
version "1.12.2"
2739+
resolved "https://registry.yarnpkg.com/axios/-/axios-1.12.2.tgz#6c307390136cf7a2278d09cec63b136dfc6e6da7"
2740+
integrity sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==
2741+
dependencies:
2742+
follow-redirects "^1.15.6"
2743+
form-data "^4.0.4"
2744+
proxy-from-env "^1.1.0"
2745+
27372746
axios@^1.6.0:
27382747
version "1.7.9"
27392748
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
@@ -7319,14 +7328,14 @@ [email protected]:
73197328
version "0.0.0"
73207329
uid ""
73217330

7322-
stream-chat@^9.17.0:
7323-
version "9.17.0"
7324-
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.17.0.tgz#540cf1ea03b08a394d6140696aae8528e9ba9ce2"
7325-
integrity sha512-ys6K73wIVWs5+qsfPJ9wumEUtgbMXYVbH1dhmAZ1oYtQ01dY/avsvt25PYDakVjKeyrnT+y8T/xEzfeF/WDJsg==
7331+
stream-chat@^9.23.0:
7332+
version "9.24.0"
7333+
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.24.0.tgz#e6af5d4b0eb396e24e0ab7f852719581c39f18bc"
7334+
integrity sha512-zLtguYRqxeEc/Cjw8Zp00u/wTrqFg4gFPKdj3mvl/Jq1Pt95mY9nMc38KW0GOu/2quIAAar0NNMq8fsXl4jupQ==
73267335
dependencies:
73277336
"@types/jsonwebtoken" "^9.0.8"
73287337
"@types/ws" "^8.5.14"
7329-
axios "^1.6.0"
7338+
axios "^1.12.2"
73307339
base64-js "^1.5.1"
73317340
form-data "^4.0.4"
73327341
isomorphic-ws "^5.0.0"

package/expo-package/src/optionalDependencies/deleteFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let FileSystem;
22

33
try {
4-
FileSystem = require('expo-file-system');
4+
FileSystem = require('expo-file-system/legacy');
55
} catch (e) {
66
// do nothing
77
}

package/expo-package/src/optionalDependencies/pickImage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Platform } from 'react-native';
2+
import { PickImageOptions } from 'stream-chat-react-native-core';
23
let ImagePicker;
34

45
try {
@@ -14,7 +15,7 @@ if (!ImagePicker) {
1415
}
1516

1617
export const pickImage = ImagePicker
17-
? async () => {
18+
? async ({ maxNumberOfFiles }: PickImageOptions = {}) => {
1819
try {
1920
let permissionGranted = true;
2021
if (Platform.OS === 'ios') {
@@ -35,6 +36,7 @@ export const pickImage = ImagePicker
3536
allowsMultipleSelection: true,
3637
mediaTypes: ['images', 'videos'],
3738
preferredAssetRepresentationMode: 'current',
39+
selectionLimit: maxNumberOfFiles,
3840
});
3941

4042
const canceled = result.canceled;

package/expo-package/src/optionalDependencies/saveFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let FileSystem;
22

33
try {
4-
FileSystem = require('expo-file-system');
4+
FileSystem = require('expo-file-system/legacy');
55
} catch (e) {
66
// do nothing
77
}

package/native-package/src/optionalDependencies/pickImage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Platform } from 'react-native';
2+
import { PickImageOptions } from 'stream-chat-react-native-core';
23
let ImagePicker;
34

45
try {
@@ -8,11 +9,12 @@ try {
89
}
910

1011
export const pickImage = ImagePicker
11-
? async () => {
12+
? async ({ maxNumberOfFiles }: PickImageOptions = {}) => {
1213
try {
1314
const result = await ImagePicker.launchImageLibrary({
1415
assetRepresentationMode: 'current',
1516
mediaType: 'mixed',
17+
selectionLimit: maxNumberOfFiles,
1618
});
1719
const canceled = result.didCancel;
1820
const errorCode = result.errorCode;

0 commit comments

Comments
 (0)