Skip to content

Commit 2402084

Browse files
committed
Merge branch 'develop' into V8
# Conflicts: # package/expo-package/package.json # package/src/contexts/overlayContext/OverlayProvider.tsx
2 parents efcd573 + 69bbbe6 commit 2402084

File tree

20 files changed

+323
-141
lines changed

20 files changed

+323
-141
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-466%20KB-blue)
13+
![JS Bundle Size](https://img.shields.io/badge/js_bundle_size-459%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/SampleApp/CHANGELOG.md

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

3+
### [3.1.1](https://github.com/GetStream/stream-chat-react-native/compare/[email protected]@v3.1.1) (2025-05-30)
4+
5+
6+
### Bug Fixes
7+
8+
* bump stream-chat version as a fix for type issues ([#3106](https://github.com/GetStream/stream-chat-react-native/issues/3106)) ([efd080a](https://github.com/GetStream/stream-chat-react-native/commit/efd080a6cd80d91fed6e05cc3c94d9db7f8bd7f7))
9+
310
## [3.1.0](https://github.com/GetStream/stream-chat-react-native/compare/[email protected]@v3.1.0) (2025-05-27)
411

512

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": "3.1.0",
3+
"version": "3.1.1",
44
"private": true,
55
"repository": {
66
"type": "git",

package/CHANGELOG.md

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

3+
### [7.1.1](https://github.com/GetStream/stream-chat-react-native/compare/v7.1.0...v7.1.1) (2025-05-30)
4+
5+
6+
### Bug Fixes
7+
8+
* add filled and unfilled bg color theme properties for ReactionListBottom ([#3100](https://github.com/GetStream/stream-chat-react-native/issues/3100)) ([7289934](https://github.com/GetStream/stream-chat-react-native/commit/72899343213aeec1f71a6b6b9890de566b9bfa10))
9+
* bump stream-chat version as a fix for type issues ([#3106](https://github.com/GetStream/stream-chat-react-native/issues/3106)) ([efd080a](https://github.com/GetStream/stream-chat-react-native/commit/efd080a6cd80d91fed6e05cc3c94d9db7f8bd7f7))
10+
11+
12+
### Performance Improvements
13+
14+
* image gallery rendering improvements ([#3108](https://github.com/GetStream/stream-chat-react-native/issues/3108)) ([e87cc22](https://github.com/GetStream/stream-chat-react-native/commit/e87cc22c66cb5ccad287ea15b32f9a179a6c4ba4))
15+
316
## [7.1.0](https://github.com/GetStream/stream-chat-react-native/compare/v7.0.1...v7.1.0) (2025-05-27)
417

518

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": "7.1.0",
4+
"version": "7.1.1",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"

package/native-package/package.json

Lines changed: 2 additions & 2 deletions
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": "7.1.0",
4+
"version": "7.1.1",
55
"homepage": "https://www.npmjs.com/package/stream-chat-react-native",
66
"author": {
77
"company": "Stream.io Inc",
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"es6-symbol": "^3.1.3",
2323
"mime": "^4.0.7",
24-
"stream-chat-react-native-core": "7.1.0"
24+
"stream-chat-react-native-core": "7.1.1"
2525
},
2626
"peerDependencies": {
2727
"@react-native-camera-roll/camera-roll": ">=7.8.0",

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,9 @@ try {
88
console.log('react-native-share is not installed');
99
}
1010

11-
let RNBlobUtil;
12-
13-
try {
14-
RNBlobUtil = require('react-native-blob-util').default;
15-
} catch (e) {
16-
console.log('react-native-blob-util is not installed');
17-
}
18-
1911
export const shareImage = RNShare
2012
? async ({ type, url }) => {
2113
try {
22-
const base64Image = await RNBlobUtil.fs.readFile(url, 'base64');
23-
const base64Url = `data:${type};base64,${base64Image}`;
2414
await RNShare.open({
2515
activityItemSources:
2616
Platform.OS === 'ios'
@@ -45,7 +35,7 @@ export const shareImage = RNShare
4535
excludedActivityTypes: [] as unknown as string,
4636
failOnCancel: false,
4737
type,
48-
url: Platform.OS === 'android' ? base64Url : undefined,
38+
url: Platform.OS === 'android' ? `file://${url}` : undefined,
4939
});
5040
return true;
5141
} catch (error) {

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": "7.1.0",
4+
"version": "7.1.1",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"

package/src/components/Channel/Channel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
10961096
if (failedMessages?.length) {
10971097
channel.state.addMessagesSorted(failedMessages);
10981098
}
1099+
await markRead();
10991100
channel.state.setIsUpToDate(true);
11001101
} else {
11011102
await reloadThread();

package/src/components/Chat/Chat.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { PropsWithChildren, useEffect, useState } from 'react';
1+
import React, { PropsWithChildren, useEffect, useMemo, useState } from 'react';
22
import { Image, Platform } from 'react-native';
33

44
import { Channel, OfflineDBState } from 'stream-chat';
@@ -11,8 +11,7 @@ import { useMutedUsers } from './hooks/useMutedUsers';
1111
import { ChannelsStateProvider } from '../../contexts/channelsStateContext/ChannelsStateContext';
1212
import { ChatContextValue, ChatProvider } from '../../contexts/chatContext/ChatContext';
1313
import { useDebugContext } from '../../contexts/debugContext/DebugContext';
14-
import { useOverlayContext } from '../../contexts/overlayContext/OverlayContext';
15-
import { DeepPartial, ThemeProvider } from '../../contexts/themeContext/ThemeContext';
14+
import { DeepPartial, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';
1615
import type { Theme } from '../../contexts/themeContext/utils/theme';
1716
import {
1817
DEFAULT_USER_LANGUAGE,
@@ -156,6 +155,11 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
156155
// Setup translators
157156
const translators = useStreami18n(i18nInstance);
158157

158+
const translationContextValue = useMemo(
159+
() => ({ ...translators, userLanguage: client.user?.language || DEFAULT_USER_LANGUAGE }),
160+
[client.user?.language, translators],
161+
);
162+
159163
/**
160164
* Setup connection event listeners
161165
*/
@@ -262,9 +266,7 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
262266

263267
return (
264268
<ChatProvider value={chatContext}>
265-
<TranslationProvider
266-
value={{ ...translators, userLanguage: client.user?.language || DEFAULT_USER_LANGUAGE }}
267-
>
269+
<TranslationProvider value={translationContextValue}>
268270
<ThemeProvider style={style}>
269271
<ChannelsStateProvider>{children}</ChannelsStateProvider>
270272
</ThemeProvider>
@@ -286,7 +288,7 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
286288
* - setActiveChannel - function to set the currently active channel
287289
*/
288290
export const Chat = (props: PropsWithChildren<ChatProps>) => {
289-
const { style } = useOverlayContext();
291+
const { theme } = useTheme();
290292

291-
return <ChatWithContext {...{ style }} {...props} />;
293+
return <ChatWithContext style={theme as DeepPartial<Theme>} {...props} />;
292294
};

0 commit comments

Comments
 (0)