Skip to content

Commit f509a27

Browse files
committed
Merge branch 'develop' into V7
# Conflicts: # package/expo-package/package.json # package/expo-package/yarn.lock # package/native-package/package.json # package/native-package/yarn.lock # package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx # package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx # package/src/components/Message/Message.tsx # package/src/components/Message/MessageSimple/MessageSimple.tsx # package/src/components/Message/MessageSimple/MessageStatus.tsx # package/src/components/Message/hooks/useMessageActionHandlers.ts # package/src/components/MessageMenu/MessageReactionPicker.tsx # package/src/contexts/messageInputContext/__tests__/pickFile.test.tsx # package/src/contexts/messagesContext/MessagesContext.tsx
2 parents e8db262 + 6758d06 commit f509a27

40 files changed

+409
-284
lines changed

README.md

Lines changed: 4 additions & 4 deletions
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-466%20KB-blue)
13+
![JS Bundle Size](https://img.shields.io/badge/js_bundle_size-467%20KB-blue)
1414

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

@@ -48,9 +48,9 @@ For complete pricing details visit our [Chat Pricing Page](https://getstream.io/
4848

4949
This repo includes 3 example apps. One made with Expo, two in TypeScript. One TypeScript app is a simple implementation for reference, the other is a more full featured app example.
5050

51-
- [Expo example](./examples/ExpoMessaging)
52-
- [Typescript example](./examples/TypeScriptMessaging)
53-
- [Fully featured messaging application](./examples/SampleApp)
51+
- [Expo example](https://github.com/GetStream/stream-chat-react-native/tree/develop/examples/ExpoMessaging)
52+
- [Typescript example](https://github.com/GetStream/stream-chat-react-native/tree/develop/examples/TypeScriptMessaging)
53+
- [Fully featured messaging application](https://github.com/GetStream/stream-chat-react-native/tree/develop/examples/SampleApp)
5454

5555
Besides, our team maintains a dedicated repository for fully-fledged sample applications and demos at [GetStream/react-native-samples](https://github.com/GetStream/react-native-samples). Please consider checking following sample applications:
5656

examples/SampleApp/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
### [2.5.1](https://github.com/GetStream/stream-chat-react-native/compare/[email protected]@v2.5.1) (2025-03-13)
4+
5+
6+
### Bug Fixes
7+
8+
* add theme for different group styles in message bubble container ([#3019](https://github.com/GetStream/stream-chat-react-native/issues/3019)) ([b911ef5](https://github.com/GetStream/stream-chat-react-native/commit/b911ef5f4ba5680e81d5c3ef7c1ddf6f108608d2))
9+
* remove scrollToFirstUnreadThreshold ([#3012](https://github.com/GetStream/stream-chat-react-native/issues/3012)) ([c423453](https://github.com/GetStream/stream-chat-react-native/commit/c423453a385591397bf6afae97e7c9366a87f734))
10+
311
## [2.5.0](https://github.com/GetStream/stream-chat-react-native/compare/[email protected]@v2.5.0) (2025-03-03)
412

513

examples/SampleApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sampleapp",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"private": true,
55
"repository": {
66
"type": "git",

package/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Change Log
22

3+
### [6.6.8](https://github.com/GetStream/stream-chat-react-native/compare/v6.6.7...v6.6.8) (2025-03-13)
4+
5+
6+
### Bug Fixes
7+
8+
* add avatar component improvements to optimize performance ([#3006](https://github.com/GetStream/stream-chat-react-native/issues/3006)) ([0cb1020](https://github.com/GetStream/stream-chat-react-native/commit/0cb10204ccc74ae247dc7aa9631cf52d2425b1f1))
9+
* add theme for different group styles in message bubble container ([#3019](https://github.com/GetStream/stream-chat-react-native/issues/3019)) ([b911ef5](https://github.com/GetStream/stream-chat-react-native/commit/b911ef5f4ba5680e81d5c3ef7c1ddf6f108608d2))
10+
* db sorting past 200 messages ([#3018](https://github.com/GetStream/stream-chat-react-native/issues/3018)) ([552e5b3](https://github.com/GetStream/stream-chat-react-native/commit/552e5b35e793b3448ba72896dc25ada1ef09873f))
11+
* improve channel preview display hooks and long title issue ([#3002](https://github.com/GetStream/stream-chat-react-native/issues/3002)) ([7dc6f52](https://github.com/GetStream/stream-chat-react-native/commit/7dc6f52b5440b70c395502815d53f108862832b0))
12+
* improve the entire channel list re-render for useUserPresence hook ([#3011](https://github.com/GetStream/stream-chat-react-native/issues/3011)) ([9042015](https://github.com/GetStream/stream-chat-react-native/commit/9042015b418ba7954dee6f9ec80f59456de98248))
13+
* memoize the read_vevents calculation to make it save a rerender ([#3008](https://github.com/GetStream/stream-chat-react-native/issues/3008)) ([70e6c70](https://github.com/GetStream/stream-chat-react-native/commit/70e6c7022a0d95da2bd7689fc1605fc16906fbd9))
14+
* native-image-picker pickImage issue ([#3017](https://github.com/GetStream/stream-chat-react-native/issues/3017)) ([897cf9c](https://github.com/GetStream/stream-chat-react-native/commit/897cf9cfc92d840d2a82c8a51730011a3f6e6d54))
15+
* properly resolve activeQueryType state ([#3004](https://github.com/GetStream/stream-chat-react-native/issues/3004)) ([f8968c0](https://github.com/GetStream/stream-chat-react-native/commit/f8968c09113f220ed8b64e38958229a7ae77a761))
16+
* remove scrollToFirstUnreadThreshold ([#3012](https://github.com/GetStream/stream-chat-react-native/issues/3012)) ([c423453](https://github.com/GetStream/stream-chat-react-native/commit/c423453a385591397bf6afae97e7c9366a87f734))
17+
318
### [6.6.7](https://github.com/GetStream/stream-chat-react-native/compare/v6.6.6...v6.6.7) (2025-03-07)
419

520

package/expo-package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stream-chat-expo",
33
"description": "The official Expo SDK for Stream Chat, a service for building chat applications",
4-
"version": "6.6.7",
4+
"version": "6.6.8",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"

package/native-package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stream-chat-react-native",
33
"description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4-
"version": "6.6.7",
4+
"version": "6.6.8",
55
"homepage": "https://www.npmjs.com/package/stream-chat-react-native",
66
"author": {
77
"company": "Stream.io Inc",

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { FlatList as DefaultFlatList, Platform } from 'react-native';
22
let FlatList;
33

4-
54
if (Platform.constants.reactNativeVersion.minor < 72) {
65
const upgradeLog =
7-
"'@stream-io/flat-list-mvcp' is deprecated, please upgrade your react-native version to >0.71 to get same the benefits on the default FlatList and uninstall the package.";
6+
"'@stream-io/flat-list-mvcp' is deprecated, please upgrade your react-native version to >0.71 to get same the benefits on the default FlatList and uninstall the package.";
87
try {
98
FlatList = require('@stream-io/flat-list-mvcp').FlatList;
109
console.log(upgradeLog);

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stream-chat-react-native-core",
33
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4-
"version": "6.6.7",
4+
"version": "6.6.8",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"

package/src/components/Attachment/AudioAttachment.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import { useTheme } from '../../contexts';
88
import { useAudioPlayer } from '../../hooks/useAudioPlayer';
99
import { Audio, Pause, Play } from '../../icons';
1010
import {
11+
NativeHandlers,
1112
PlaybackStatus,
12-
SDK,
13-
Sound,
1413
SoundReturnType,
1514
VideoPayloadData,
1615
VideoProgressData,
@@ -51,7 +50,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
5150
testID,
5251
} = props;
5352
const { changeAudioSpeed, pauseAudio, playAudio, seekAudio } = useAudioPlayer({ soundRef });
54-
const isExpoCLI = SDK === 'stream-chat-expo';
53+
const isExpoCLI = NativeHandlers.SDK === 'stream-chat-expo';
5554
const isVoiceRecording = item.type === FileTypes.VoiceRecording;
5655

5756
/** This is for Native CLI Apps */
@@ -181,8 +180,8 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
181180
useEffect(() => {
182181
if (isExpoCLI) {
183182
const initiateSound = async () => {
184-
if (item && item.file && item.file.uri) {
185-
soundRef.current = await Sound.initializeSound(
183+
if (item && item.file && item.file.uri && NativeHandlers.Sound?.initializeSound) {
184+
soundRef.current = await NativeHandlers.Sound.initializeSound(
186185
{ uri: item.file.uri },
187186
{
188187
progressUpdateIntervalMillis: 100,
@@ -216,7 +215,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
216215
}
217216
};
218217
// For expo CLI
219-
if (!Sound.Player) {
218+
if (!NativeHandlers.Sound?.Player) {
220219
initalPlayPause();
221220
}
222221
}, [item.paused, isExpoCLI, pauseAudio, playAudio]);
@@ -344,8 +343,8 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
344343
</View>
345344
)}
346345
</View>
347-
{Sound.Player && (
348-
<Sound.Player
346+
{NativeHandlers.Sound?.Player && (
347+
<NativeHandlers.Sound.Player
349348
onEnd={handleEnd}
350349
onLoad={handleLoad}
351350
onProgress={handleProgress}

package/src/components/AttachmentPicker/AttachmentPicker.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
} from '../../contexts/attachmentPickerContext/AttachmentPickerContext';
1818
import { useTheme } from '../../contexts/themeContext/ThemeContext';
1919
import { useScreenDimensions } from '../../hooks/useScreenDimensions';
20-
import { getPhotos, oniOS14GalleryLibrarySelectionChange } from '../../native';
20+
import { NativeHandlers } from '../../native';
2121
import type { Asset } from '../../types/types';
2222
import { BottomSheet } from '../BottomSheetCompatibility/BottomSheet';
2323
import { BottomSheetFlatList } from '../BottomSheetCompatibility/BottomSheetFlatList';
@@ -122,11 +122,12 @@ export const AttachmentPicker = React.forwardRef(
122122
setLoadingPhotos(true);
123123
const endCursor = endCursorRef.current;
124124
try {
125-
if (!getPhotos) {
125+
if (!NativeHandlers.getPhotos) {
126126
setPhotos([]);
127127
setIosLimited(false);
128+
return;
128129
}
129-
const results = await getPhotos({
130+
const results = await NativeHandlers.getPhotos({
130131
after: endCursor,
131132
first: numberOfAttachmentImagesToLoadPerCall ?? 60,
132133
});
@@ -153,11 +154,11 @@ export const AttachmentPicker = React.forwardRef(
153154
return;
154155
}
155156

156-
if (!oniOS14GalleryLibrarySelectionChange) {
157+
if (!NativeHandlers.oniOS14GalleryLibrarySelectionChange) {
157158
return;
158159
}
159160
// ios 14 library selection change event is fired when user reselects the images that are permitted to be readable by the app
160-
const { unsubscribe } = oniOS14GalleryLibrarySelectionChange(() => {
161+
const { unsubscribe } = NativeHandlers.oniOS14GalleryLibrarySelectionChange(() => {
161162
// we reset the cursor and has next page to true to facilitate fetching of the first page of photos again
162163
hasNextPageRef.current = true;
163164
endCursorRef.current = undefined;

0 commit comments

Comments
 (0)