Skip to content

Commit 5fb6094

Browse files
committed
feat: migrate to @sendbird/react-native-create-thumbnail for thumbnail creation
1 parent 3dae1e3 commit 5fb6094

File tree

12 files changed

+36
-79
lines changed

12 files changed

+36
-79
lines changed

docs-validation/1_introduction/NativeModules.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import * as DocumentPicker from '@react-native-documents/picker';
2525
import * as FileAccess from 'react-native-file-access';
2626
import * as ImagePicker from 'react-native-image-picker';
2727
import * as Permissions from 'react-native-permissions';
28-
import * as CreateThumbnail from 'react-native-create-thumbnail';
28+
import * as CreateThumbnail from '@sendbird/react-native-create-thumbnail';
2929
import * as ImageResizer from '@bam.tech/react-native-image-resizer';
3030
import * as AudioRecorderPlayer from 'react-native-nitro-sound';
3131

docs-validation/1_introduction/SendYourFirstMessage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import * as DocumentPicker from '@react-native-documents/picker';
2222
import * as FileAccess from 'react-native-file-access';
2323
import * as ImagePicker from 'react-native-image-picker';
2424
import * as Permissions from 'react-native-permissions';
25-
import * as CreateThumbnail from 'react-native-create-thumbnail';
25+
import * as CreateThumbnail from '@sendbird/react-native-create-thumbnail';
2626
import * as ImageResizer from '@bam.tech/react-native-image-resizer';
2727
import * as AudioRecorderPlayer from 'react-native-nitro-sound';
2828

docs-validation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"date-fns": "^4.1.0",
2020
"react": "19.1.1",
2121
"react-native": "0.82.1",
22-
"react-native-create-thumbnail": "^2.0.0",
22+
"@sendbird/react-native-create-thumbnail": "^1.0.1",
2323
"react-native-file-access": "^3.1.0",
2424
"react-native-image-picker": "^8.2.0",
2525
"react-native-mmkv": "^4.0.0",

packages/uikit-react-native/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ npm install react-native-video \
149149
react-native-file-access \
150150
react-native-image-picker \
151151
react-native-document-picker \
152-
react-native-create-thumbnail \
153152
react-native-nitro-sound \
154153
@react-native-clipboard/clipboard \
155154
@react-native-camera-roll/camera-roll \
156155
@react-native-firebase/app \
157156
@react-native-firebase/messaging \
157+
@sendbird/react-native-create-thumbnail \
158158
@bam.tech/react-native-image-resizer
159159

160160
npx pod-install
@@ -169,7 +169,7 @@ import * as DocumentPicker from '@react-native-documents/picker';
169169
import * as FileAccess from 'react-native-file-access';
170170
import * as ImagePicker from 'react-native-image-picker';
171171
import * as Permissions from 'react-native-permissions';
172-
import * as CreateThumbnail from 'react-native-create-thumbnail';
172+
import * as CreateThumbnail from '@sendbird/react-native-create-thumbnail';
173173
import * as ImageResizer from '@bam.tech/react-native-image-resizer';
174174
import * as AudioRecorderPlayer from 'react-native-nitro-sound';
175175

packages/uikit-react-native/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@react-native-documents/picker": "^10.1.0",
8484
"@react-native-firebase/app": "^19.3.0",
8585
"@react-native-firebase/messaging": "^19.3.0",
86+
"@sendbird/react-native-create-thumbnail": "^1.0.1",
8687
"@types/react": "*",
8788
"@types/react-native": "*",
8889
"date-fns": ">=2.28.0",
@@ -173,6 +174,9 @@
173174
"@react-native-firebase/messaging": {
174175
"optional": true
175176
},
177+
"@sendbird/react-native-create-thumbnail": {
178+
"optional": true
179+
},
176180
"@sendbird/react-native-scrollview-enhancer": {
177181
"optional": true
178182
},

packages/uikit-react-native/src/platform/createMediaService.native.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import React from 'react';
33
import type * as RNCreateThumbnail from 'react-native-create-thumbnail';
44
import type RNVideo from 'react-native-video';
55

6+
import type * as SBCreateThumbnail from '@sendbird/react-native-create-thumbnail';
67
import { getDownscaleSize, getFileExtension, hash } from '@sendbird/uikit-utils';
78

89
import SBUUtils from '../libs/SBUUtils';
910
import type { MediaServiceInterface } from './types';
1011

12+
export type ThumbnailModule = typeof SBCreateThumbnail | typeof RNCreateThumbnail;
13+
1114
type Modules = {
1215
VideoComponent: typeof RNVideo;
13-
thumbnailModule: typeof RNCreateThumbnail;
16+
thumbnailModule: ThumbnailModule;
1417
imageResizerModule: typeof RNImageResizer;
1518
};
1619

patches/react-native-create-thumbnail+2.1.1.patch

Lines changed: 0 additions & 64 deletions
This file was deleted.

sample/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,8 +1995,6 @@ PODS:
19951995
- ReactCommon/turbomodule/core
19961996
- SocketRocket
19971997
- Yoga
1998-
- react-native-create-thumbnail (2.1.1):
1999-
- React-Core
20001998
- react-native-document-picker (10.1.7):
20011999
- boost
20022000
- DoubleConversion
@@ -3053,6 +3051,8 @@ PODS:
30533051
- SDWebImageWebPCoder (0.8.5):
30543052
- libwebp (~> 1.0)
30553053
- SDWebImage/Core (~> 5.10)
3054+
- sendbird-react-native-create-thumbnail (1.0.2):
3055+
- React-Core
30563056
- SocketRocket (0.7.1)
30573057
- Yoga (0.0.0)
30583058
- ZIPFoundation (0.9.20)
@@ -3109,7 +3109,6 @@ DEPENDENCIES:
31093109
- React-Mapbuffer (from `../../node_modules/react-native/ReactCommon`)
31103110
- React-microtasksnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
31113111
- "react-native-cameraroll (from `../../node_modules/@react-native-camera-roll/camera-roll`)"
3112-
- react-native-create-thumbnail (from `../../node_modules/react-native-create-thumbnail`)
31133112
- "react-native-document-picker (from `../../node_modules/@react-native-documents/picker`)"
31143113
- react-native-image-picker (from `../../node_modules/react-native-image-picker`)
31153114
- "react-native-image-resizer (from `../../node_modules/@bam.tech/react-native-image-resizer`)"
@@ -3161,6 +3160,7 @@ DEPENDENCIES:
31613160
- "RNNotifeeCore (from `../../node_modules/@notifee/react-native/RNNotifeeCore.podspec`)"
31623161
- RNPermissions (from `../../node_modules/react-native-permissions`)
31633162
- RNScreens (from `../../node_modules/react-native-screens`)
3163+
- "sendbird-react-native-create-thumbnail (from `../../node_modules/@sendbird/react-native-create-thumbnail`)"
31643164
- SocketRocket (~> 0.7.1)
31653165
- Yoga (from `../../node_modules/react-native/ReactCommon/yoga`)
31663166

@@ -3274,8 +3274,6 @@ EXTERNAL SOURCES:
32743274
:path: "../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
32753275
react-native-cameraroll:
32763276
:path: "../../node_modules/@react-native-camera-roll/camera-roll"
3277-
react-native-create-thumbnail:
3278-
:path: "../../node_modules/react-native-create-thumbnail"
32793277
react-native-document-picker:
32803278
:path: "../../node_modules/@react-native-documents/picker"
32813279
react-native-image-picker:
@@ -3378,6 +3376,8 @@ EXTERNAL SOURCES:
33783376
:path: "../../node_modules/react-native-permissions"
33793377
RNScreens:
33803378
:path: "../../node_modules/react-native-screens"
3379+
sendbird-react-native-create-thumbnail:
3380+
:path: "../../node_modules/@sendbird/react-native-create-thumbnail"
33813381
Yoga:
33823382
:path: "../../node_modules/react-native/ReactCommon/yoga"
33833383

@@ -3439,7 +3439,6 @@ SPEC CHECKSUMS:
34393439
React-Mapbuffer: 06d59c448da7e34eb05b3fb2189e12f6a30fec57
34403440
React-microtasksnativemodule: d1ee999dc9052e23f6488b730fa2d383a4ea40e5
34413441
react-native-cameraroll: bb98380ee21115d5fe1ae0f8b80c86e044613746
3442-
react-native-create-thumbnail: 733160dca9a548262e1030e7fcdae90a93d203ca
34433442
react-native-document-picker: 1734eb0aa3dbd1cd7bf1b105936f9b55031ae616
34443443
react-native-image-picker: 0314366753615115fa55c3cc937ac44cb7e75702
34453444
react-native-image-resizer: 290b045c34c69db7574e4d08aadfc4abe1ff5a99
@@ -3493,6 +3492,7 @@ SPEC CHECKSUMS:
34933492
RNScreens: d821082c6dd1cb397cc0c98b026eeafaa68be479
34943493
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
34953494
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
3495+
sendbird-react-native-create-thumbnail: 60f24fb637306b6914307e678435909172fb9143
34963496
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
34973497
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb
34983498
ZIPFoundation: dfd3d681c4053ff7e2f7350bc4e53b5dba3f5351

sample/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@react-navigation/native": "^6.1.17",
3131
"@react-navigation/native-stack": "^6.10.0",
3232
"@sendbird/chat": "^4.20.2",
33+
"@sendbird/react-native-create-thumbnail": "^1.0.1",
3334
"@storybook/addon-actions": "^6.4.19",
3435
"@storybook/addon-controls": "^6.4.19",
3536
"@storybook/addon-ondevice-actions": "^6.0.1-alpha.7",
@@ -40,7 +41,6 @@
4041
"fbjs": "^3.0.4",
4142
"react": "19.1.1",
4243
"react-native": "0.82.1",
43-
"react-native-create-thumbnail": "^2.1.1",
4444
"react-native-fast-image": "^8.6.3",
4545
"react-native-file-access": "^3.1.1",
4646
"react-native-image-picker": "^8.2.0",

sample/src/factory/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import * as DocumentPicker from '@react-native-documents/picker';
55
import RNFBMessaging from '@react-native-firebase/messaging';
66
import { createNativeStackNavigator } from '@react-navigation/native-stack';
77
import { Platform, StatusBar } from 'react-native';
8-
import * as CreateThumbnail from 'react-native-create-thumbnail';
98
import * as FileAccess from 'react-native-file-access';
109
import * as ImagePicker from 'react-native-image-picker';
1110
import * as AudioRecorderPlayer from 'react-native-nitro-sound';
1211
import * as Permissions from 'react-native-permissions';
1312
import Video from 'react-native-video';
1413

14+
import * as CreateThumbnail from '@sendbird/react-native-create-thumbnail';
1515
import {
1616
SendbirdUIKitContainerProps,
1717
createNativeClipboardService,

0 commit comments

Comments
 (0)