Skip to content

Commit a20af2e

Browse files
committed
Merge branch 'develop' of github.com:GetStream/stream-chat-react-native into move-render-item-out
2 parents ee1aac8 + 53eeafb commit a20af2e

Some content is hidden

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

45 files changed

+500
-212
lines changed

examples/ExpoMessaging/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -7358,10 +7358,10 @@ stream-buffers@2.2.x, stream-buffers@~2.2.0:
73587358
version "0.0.0"
73597359
uid ""
73607360

7361-
stream-chat-react-native-core@6.6.7:
7362-
version "6.6.7"
7363-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.7.tgz#d887234af18890c3396f1b8b5f169d9b28a793ab"
7364-
integrity sha512-Xc/S92nUBSwfVPZqNjt/zNs/DJcRV1aRa/+yCSBCqjCwo0EuiWEP9yKy3xGxBkehNe4vaIDvkeREduA4dRUGpA==
7361+
stream-chat-react-native-core@6.6.8:
7362+
version "6.6.8"
7363+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.8.tgz#483ade63ba051426480ab2dfd8ab3b248b90ae88"
7364+
integrity sha512-F8S70DHaiit6BEdKOkSMHq2bjMONhrouvJ+szBQuE430EJDgUlc2VErHk3yJCzqIt5lwfVZktjHuqSIOGVg5LQ==
73657365
dependencies:
73667366
"@gorhom/bottom-sheet" "^5.1.1"
73677367
dayjs "1.10.5"

examples/SampleApp/android/app/src/main/AndroidManifest.xml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<uses-permission android:name="android.permission.INTERNET" />
33
<uses-permission android:name="android.permission.CAMERA" />
44
<uses-permission android:name="android.permission.RECORD_AUDIO" />
5+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
6+
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
57

68
<queries>
79
<intent>

examples/SampleApp/ios/Podfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ PODS:
14331433
- ReactCommon/turbomodule/bridging
14341434
- ReactCommon/turbomodule/core
14351435
- Yoga
1436-
- react-native-cameraroll (7.9.0):
1436+
- react-native-cameraroll (7.10.0):
14371437
- DoubleConversion
14381438
- glog
14391439
- hermes-engine
@@ -2213,7 +2213,7 @@ PODS:
22132213
- libwebp (~> 1.0)
22142214
- SDWebImage/Core (~> 5.10)
22152215
- SocketRocket (0.7.1)
2216-
- stream-chat-react-native (6.6.7):
2216+
- stream-chat-react-native (6.6.8):
22172217
- DoubleConversion
22182218
- glog
22192219
- hermes-engine
@@ -2589,7 +2589,7 @@ SPEC CHECKSUMS:
25892589
React-Mapbuffer: 9fbb496e7d6f7c34d5e617365ee778bf96d14eae
25902590
React-microtasksnativemodule: 36adde22631838680d1be62776e8ccb83186c06a
25912591
react-native-blob-util: d03eaad9fd1bbe90bd0eedb5bad3333215976086
2592-
react-native-cameraroll: 45c76b20e80da6fbf48ba17490990305810a2a7f
2592+
react-native-cameraroll: 10054f480dfd6e0bd02fdf08fb6d82f80b362575
25932593
react-native-document-picker: 78c262a7f9f77df2380378aa4b3413b8646ce91b
25942594
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
25952595
react-native-safe-area-context: 02e0f487c16ccf1acc8a666bed2318ceeb5dc14c
@@ -2637,7 +2637,7 @@ SPEC CHECKSUMS:
26372637
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
26382638
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
26392639
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2640-
stream-chat-react-native: 46be17d00c7de9c1c032e217257cd494b2f7f277
2640+
stream-chat-react-native: fe01622d1cbabaee9a0f65b5e469041b1e7868a4
26412641
Yoga: be02ca501b03c79d7027a6bbbd0a8db985034f11
26422642

26432643
PODFILE CHECKSUM: 4f662370295f8f9cee909f1a4c59a614999a209d

examples/SampleApp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@notifee/react-native": "^9.1.8",
2727
"@op-engineering/op-sqlite": "^11.4.7",
2828
"@react-native-async-storage/async-storage": "^2.1.1",
29-
"@react-native-camera-roll/camera-roll": "^7.9.0",
29+
"@react-native-camera-roll/camera-roll": "^7.10.0",
3030
"@react-native-community/netinfo": "^11.4.1",
3131
"@react-native-documents/picker": "^10.1.1",
3232
"@react-native-firebase/app": "21.11.0",

examples/SampleApp/yarn.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -1969,10 +1969,10 @@
19691969
dependencies:
19701970
merge-options "^3.0.4"
19711971

1972-
"@react-native-camera-roll/camera-roll@^7.9.0":
1973-
version "7.9.0"
1974-
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.9.0.tgz#7b3d199b073e9f63d49852c44456c4fa0aa27e90"
1975-
integrity sha512-Ra0lB1G2H11MzL5aIH3bwlxU1zaHGSZeRs4lBXLBO64Ai1gUgZPR7TYgKDeeRPzNPtSbZKmzs+fuZ/7XoCf1SA==
1972+
"@react-native-camera-roll/camera-roll@^7.10.0":
1973+
version "7.10.0"
1974+
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.10.0.tgz#5e9518d78a9cd87ddc8e68d03e31a608df5033ab"
1975+
integrity sha512-Zm1yHxxTQS2APsnnxUFoLnK+DMMTPqmIQ2z2pGtNyHRXAG40Nt4MLVB3tDJTWnuJLAG87BpTCEvpz49+u0YkUw==
19761976

19771977
"@react-native-community/cli-clean@15.1.3":
19781978
version "15.1.3"
@@ -7530,10 +7530,10 @@ statuses@~1.5.0:
75307530
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
75317531
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
75327532

7533-
stream-chat-react-native-core@6.6.7:
7534-
version "6.6.7"
7535-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.7.tgz#d887234af18890c3396f1b8b5f169d9b28a793ab"
7536-
integrity sha512-Xc/S92nUBSwfVPZqNjt/zNs/DJcRV1aRa/+yCSBCqjCwo0EuiWEP9yKy3xGxBkehNe4vaIDvkeREduA4dRUGpA==
7533+
stream-chat-react-native-core@6.6.8:
7534+
version "6.6.8"
7535+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.8.tgz#483ade63ba051426480ab2dfd8ab3b248b90ae88"
7536+
integrity sha512-F8S70DHaiit6BEdKOkSMHq2bjMONhrouvJ+szBQuE430EJDgUlc2VErHk3yJCzqIt5lwfVZktjHuqSIOGVg5LQ==
75377537
dependencies:
75387538
"@gorhom/bottom-sheet" "^5.1.1"
75397539
dayjs "1.10.5"

examples/TypeScriptMessaging/ios/Podfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ PODS:
20392039
- ReactCommon/turbomodule/core
20402040
- Yoga
20412041
- SocketRocket (0.7.1)
2042-
- stream-chat-react-native (6.6.7):
2042+
- stream-chat-react-native (6.6.8):
20432043
- DoubleConversion
20442044
- glog
20452045
- hermes-engine
@@ -2322,7 +2322,7 @@ EXTERNAL SOURCES:
23222322
:path: "../node_modules/react-native/ReactCommon/yoga"
23232323

23242324
SPEC CHECKSUMS:
2325-
boost: 1dca942403ed9342f98334bf4c3621f011aa7946
2325+
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
23262326
DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385
23272327
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
23282328
FBLazyVector: 6fe148afcef2e3213e484758e3459609d40d57f5
@@ -2404,7 +2404,7 @@ SPEC CHECKSUMS:
24042404
RNShare: 56b5431c60e1e9ee167191f4f327471af1c2941a
24052405
RNSVG: 8126581b369adf6a0004b6a6cab1a55e3002d5b0
24062406
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2407-
stream-chat-react-native: f2cbd02c0a9838bb512b223d511267d2df5312bc
2407+
stream-chat-react-native: f394c3690415a9ad3c3ab741da3f0e72660de074
24082408
Yoga: afd04ff05ebe0121a00c468a8a3c8080221cb14c
24092409

24102410
PODFILE CHECKSUM: 6b7a4b74915b42bfe4ffddaf67cbf5e7a2bfeab3

examples/TypeScriptMessaging/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -6921,10 +6921,10 @@ statuses@~1.5.0:
69216921
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
69226922
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
69236923

6924-
stream-chat-react-native-core@6.6.7:
6925-
version "6.6.7"
6926-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.7.tgz#d887234af18890c3396f1b8b5f169d9b28a793ab"
6927-
integrity sha512-Xc/S92nUBSwfVPZqNjt/zNs/DJcRV1aRa/+yCSBCqjCwo0EuiWEP9yKy3xGxBkehNe4vaIDvkeREduA4dRUGpA==
6924+
stream-chat-react-native-core@6.6.8:
6925+
version "6.6.8"
6926+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.8.tgz#483ade63ba051426480ab2dfd8ab3b248b90ae88"
6927+
integrity sha512-F8S70DHaiit6BEdKOkSMHq2bjMONhrouvJ+szBQuE430EJDgUlc2VErHk3yJCzqIt5lwfVZktjHuqSIOGVg5LQ==
69286928
dependencies:
69296929
"@gorhom/bottom-sheet" "^5.1.1"
69306930
dayjs "1.10.5"

package/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## [6.7.0](https://github.com/GetStream/stream-chat-react-native/compare/v6.6.8...v6.7.0) (2025-03-17)
4+
5+
6+
### Features
7+
8+
* add support for react compiler on RN 0.77 ([#3024](https://github.com/GetStream/stream-chat-react-native/issues/3024)) ([6758d06](https://github.com/GetStream/stream-chat-react-native/commit/6758d06ec629e9779c536e39b22dfd933ebf5b27))
9+
10+
11+
### Bug Fixes
12+
13+
* show correct read status on the message status component for a message ([#3023](https://github.com/GetStream/stream-chat-react-native/issues/3023)) ([6a1e9f6](https://github.com/GetStream/stream-chat-react-native/commit/6a1e9f6e499324a3f97cced0fd68b5e30cc1145b))
14+
315
### [6.6.8](https://github.com/GetStream/stream-chat-react-native/compare/v6.6.7...v6.6.8) (2025-03-13)
416

517

package/expo-package/package.json

+2-2
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.8",
4+
"version": "6.7.0",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"
@@ -10,7 +10,7 @@
1010
"main": "src/index.js",
1111
"types": "types/index.d.ts",
1212
"dependencies": {
13-
"stream-chat-react-native-core": "6.6.8"
13+
"stream-chat-react-native-core": "6.7.0"
1414
},
1515
"peerDependencies": {
1616
"expo": ">=51.0.0",

package/expo-package/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -4733,10 +4733,10 @@ stream-buffers@2.2.x, stream-buffers@~2.2.0:
47334733
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
47344734
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==
47354735

4736-
stream-chat-react-native-core@6.6.7:
4737-
version "6.6.7"
4738-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.7.tgz#d887234af18890c3396f1b8b5f169d9b28a793ab"
4739-
integrity sha512-Xc/S92nUBSwfVPZqNjt/zNs/DJcRV1aRa/+yCSBCqjCwo0EuiWEP9yKy3xGxBkehNe4vaIDvkeREduA4dRUGpA==
4736+
stream-chat-react-native-core@6.6.8:
4737+
version "6.6.8"
4738+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.8.tgz#483ade63ba051426480ab2dfd8ab3b248b90ae88"
4739+
integrity sha512-F8S70DHaiit6BEdKOkSMHq2bjMONhrouvJ+szBQuE430EJDgUlc2VErHk3yJCzqIt5lwfVZktjHuqSIOGVg5LQ==
47404740
dependencies:
47414741
"@gorhom/bottom-sheet" "^5.1.1"
47424742
dayjs "1.10.5"

package/native-package/package.json

+2-2
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.8",
4+
"version": "6.7.0",
55
"homepage": "https://www.npmjs.com/package/stream-chat-react-native",
66
"author": {
77
"company": "Stream.io Inc",
@@ -20,7 +20,7 @@
2020
"types": "types/index.d.ts",
2121
"dependencies": {
2222
"es6-symbol": "^3.1.3",
23-
"stream-chat-react-native-core": "6.6.8"
23+
"stream-chat-react-native-core": "6.7.0"
2424
},
2525
"peerDependencies": {
2626
"@react-native-camera-roll/camera-roll": ">=7.8.0",

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

+1-2
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/native-package/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -3409,10 +3409,10 @@ statuses@~1.5.0:
34093409
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
34103410
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
34113411

3412-
stream-chat-react-native-core@6.6.7:
3413-
version "6.6.7"
3414-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.7.tgz#d887234af18890c3396f1b8b5f169d9b28a793ab"
3415-
integrity sha512-Xc/S92nUBSwfVPZqNjt/zNs/DJcRV1aRa/+yCSBCqjCwo0EuiWEP9yKy3xGxBkehNe4vaIDvkeREduA4dRUGpA==
3412+
stream-chat-react-native-core@6.6.8:
3413+
version "6.6.8"
3414+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.6.8.tgz#483ade63ba051426480ab2dfd8ab3b248b90ae88"
3415+
integrity sha512-F8S70DHaiit6BEdKOkSMHq2bjMONhrouvJ+szBQuE430EJDgUlc2VErHk3yJCzqIt5lwfVZktjHuqSIOGVg5LQ==
34163416
dependencies:
34173417
"@gorhom/bottom-sheet" "^5.1.1"
34183418
dayjs "1.10.5"

package/package.json

+3-2
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.8",
4+
"version": "6.7.0",
55
"author": {
66
"company": "Stream.io Inc",
77
"name": "Stream.io Inc"
@@ -22,7 +22,7 @@
2222
"README.md"
2323
],
2424
"scripts": {
25-
"build": "rm -rf lib && yarn run --silent build-translations && bob build && yarn run --silent copy-translations",
25+
"build": "rimraf lib && yarn run --silent build-translations && bob build && yarn run --silent copy-translations",
2626
"build-translations": "i18next",
2727
"copy-translations": "echo '\u001b[34mℹ\u001b[0m Copying translation files to \u001b[34mlib/typescript/i18n\u001b[0m' && cp -R -f ./src/i18n ./lib/typescript/i18n && echo '\u001b[32m✓\u001b[0m Done Copying Translations'",
2828
"eslint": "eslint 'src/**/*.{js,md,ts,jsx,tsx}' --max-warnings 0",
@@ -147,6 +147,7 @@
147147
"react-native-reanimated": "~3.17.1",
148148
"react-native-svg": "15.11.2",
149149
"react-test-renderer": "19.0.0",
150+
"rimraf": "^6.0.1",
150151
"typescript": "5.8.2",
151152
"typescript-eslint": "^8.25.0",
152153
"uuid": "^11.1.0"

package/src/components/Attachment/AudioAttachment.tsx

+7-8
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

+6-5
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;

package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Pressable, StyleSheet, Text } from 'react-native';
33

44
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
55
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
6-
import { iOS14RefreshGallerySelection } from '../../../native';
6+
import { NativeHandlers } from '../../../native';
77

88
export const AttachmentPickerIOSSelectMorePhotos = () => {
99
const { t } = useTranslationContext();
@@ -13,13 +13,13 @@ export const AttachmentPickerIOSSelectMorePhotos = () => {
1313
},
1414
} = useTheme();
1515

16-
if (!iOS14RefreshGallerySelection) {
16+
if (!NativeHandlers.iOS14RefreshGallerySelection) {
1717
return null;
1818
}
1919

2020
return (
2121
<Pressable
22-
onPress={iOS14RefreshGallerySelection}
22+
onPress={NativeHandlers.iOS14RefreshGallerySelection}
2323
style={[styles.container, { backgroundColor: white }]}
2424
>
2525
<Text style={[styles.text, { color: accent_blue }]}>{t<string>('Select More Photos')}</Text>

0 commit comments

Comments
 (0)