Skip to content

Commit 2e80e0d

Browse files
v5.2.5
1 parent 8dfa848 commit 2e80e0d

File tree

130 files changed

+7958
-1264
lines changed

Some content is hidden

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

130 files changed

+7958
-1264
lines changed

examples/SampleApp/App.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,9 @@ const App = (): React.ReactElement => {
269269
// Once initialization is complete, render the main app UI.
270270
return (
271271
<SafeAreaProvider>
272-
<SafeAreaView edges={['top', 'bottom']} style={{ flex: 1 }}>
273-
<CometChatThemeProvider theme={theme}>
274-
<CometChatI18nProvider>
275-
{/* Render the incoming call UI if the user is logged in and a call is received */}
272+
{/* Render the incoming call UI if the user is logged in and a call is received */}
273+
<CometChatThemeProvider theme={theme}>
274+
<CometChatI18nProvider>
276275
{isLoggedIn && callReceived && incomingCall.current ? (
277276
<CometChatIncomingCall
278277
call={incomingCall.current}
@@ -283,14 +282,15 @@ const App = (): React.ReactElement => {
283282
}}
284283
/>
285284
) : null}
285+
<SafeAreaView edges={['top', 'bottom']} style={{ flex: 1 }}>
286286
{/* Render the main navigation stack, passing the login status as a prop */}
287287
<RootStackNavigator
288288
isLoggedIn={isLoggedIn}
289289
hasValidAppCredentials={hasValidAppCredentials}
290290
/>
291-
</CometChatI18nProvider>
292-
</CometChatThemeProvider>
293-
</SafeAreaView>
291+
</SafeAreaView>
292+
</CometChatI18nProvider>
293+
</CometChatThemeProvider>
294294
</SafeAreaProvider>
295295
);
296296
};

examples/SampleApp/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ android {
8383
minSdkVersion rootProject.ext.minSdkVersion
8484
targetSdkVersion rootProject.ext.targetSdkVersion
8585
versionCode 1
86-
versionName "5.2.3"
86+
versionName "5.2.5"
8787
}
8888
signingConfigs {
8989
debug {

examples/SampleApp/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
targetSdkVersion = 36
77
ndkVersion = "27.1.12297006"
88
kotlinVersion = "2.1.20"
9-
version = "V5.2.3"
9+
version = "V5.2.5"
1010
}
1111
repositories {
1212
google()

examples/SampleApp/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,13 +1755,13 @@ PODS:
17551755
- SocketRocket
17561756
- react-native-background-timer (2.4.1):
17571757
- React-Core
1758-
- react-native-cometchat-ui-kit (5.2.3):
1758+
- react-native-cometchat-ui-kit (5.2.5):
17591759
- React-Core
1760-
- react-native-cometchat-ui-kit/Video (= 5.2.3)
1761-
- react-native-cometchat-ui-kit/VideoCaching (= 5.2.3)
1762-
- react-native-cometchat-ui-kit/Video (5.2.3):
1760+
- react-native-cometchat-ui-kit/Video (= 5.2.5)
1761+
- react-native-cometchat-ui-kit/VideoCaching (= 5.2.5)
1762+
- react-native-cometchat-ui-kit/Video (5.2.5):
17631763
- React-Core
1764-
- react-native-cometchat-ui-kit/VideoCaching (5.2.3):
1764+
- react-native-cometchat-ui-kit/VideoCaching (5.2.5):
17651765
- DVAssetLoaderDelegate (~> 0.3.1)
17661766
- React-Core
17671767
- react-native-cometchat-ui-kit/Video
@@ -3032,7 +3032,7 @@ SPEC CHECKSUMS:
30323032
React-Mapbuffer: 33f678ee25b6c0ee2b01b1ecec08e3e02424cefe
30333033
React-microtasksnativemodule: 44b44a4d3cd6ffb85d928abf741acdc26722de2e
30343034
react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
3035-
react-native-cometchat-ui-kit: c067f21597c8a398d63838f8e833778e7f066522
3035+
react-native-cometchat-ui-kit: f4bb042723039a858ead1054c873075287c5bf37
30363036
react-native-netinfo: f0a9899081c185db1de5bb2fdc1c88c202a059ac
30373037
react-native-safe-area-context: 6d8a7b750e496e37bda47c938320bf2c734d441f
30383038
react-native-video: f0566c7e82ba660f656c3269436f297a3f6a02d9

examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
"$(inherited)",
269269
"@executable_path/Frameworks",
270270
);
271-
MARKETING_VERSION = v5.2.3;
271+
MARKETING_VERSION = v5.2.5;
272272
OTHER_LDFLAGS = (
273273
"$(inherited)",
274274
"-ObjC",
@@ -296,7 +296,7 @@
296296
"$(inherited)",
297297
"@executable_path/Frameworks",
298298
);
299-
MARKETING_VERSION = v5.2.3;
299+
MARKETING_VERSION = v5.2.5;
300300
OTHER_LDFLAGS = (
301301
"$(inherited)",
302302
"-ObjC",

examples/SampleApp/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/SampleApp/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sample-app",
3-
"version": "5.2.3",
3+
"version": "5.2.5",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -11,8 +11,8 @@
1111
},
1212
"dependencies": {
1313
"@cometchat/calls-sdk-react-native": "^4.4.0",
14-
"@cometchat/chat-sdk-react-native": "^4.0.16",
15-
"@cometchat/chat-uikit-react-native": "^5.2.3",
14+
"@cometchat/chat-sdk-react-native": "^4.0.18",
15+
"@cometchat/chat-uikit-react-native": "^5.2.5",
1616
"@react-native-async-storage/async-storage": "^2.2.0",
1717
"@react-native-clipboard/clipboard": "^1.16.3",
1818
"@react-native-community/datetimepicker": "^8.4.5",
@@ -31,8 +31,8 @@
3131
"react-native-safe-area-context": "^5.5.2",
3232
"react-native-screens": "^4.16.0",
3333
"react-native-svg": "^15.13.0",
34-
"react-native-vision-camera": "^4.7.2",
3534
"react-native-video": "^6.16.1",
35+
"react-native-vision-camera": "^4.7.2",
3636
"react-native-webrtc": "^124.0.6",
3737
"zustand": "^5.0.8"
3838
},

examples/SampleApp/src/components/calls/CallDetails.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const CallDetails: React.FC<Props> = ({route, navigation}) => {
5656
selectedItemTextStyle: TextStyle;
5757
}>();
5858
const BackIcon = ICONS['arrow-back'];
59+
const [toastMessage, setToastMessage] = useState<string | null>(null);
5960

6061
useEffect(() => {
6162
console.log('CALL RECEIVER: ', call);
@@ -181,6 +182,28 @@ export const CallDetails: React.FC<Props> = ({route, navigation}) => {
181182
[call],
182183
);
183184

185+
/** Busy call toast: only when attempting a call and target is busy */
186+
useEffect(() => {
187+
const callListener = new CometChat.CallListener({
188+
onOutgoingCallRejected: (rejectedCall: any) => {
189+
try {
190+
const status = rejectedCall?.getStatus?.() || rejectedCall?.status;
191+
if (
192+
status &&
193+
status.toLowerCase() === CometChat.CALL_STATUS.BUSY.toLowerCase()
194+
) {
195+
setToastMessage(t('CALL_BUSY'));
196+
setTimeout(() => setToastMessage(null), 3000);
197+
}
198+
} catch {}
199+
},
200+
});
201+
CometChat.addCallListener(listenerId, callListener);
202+
return () => {
203+
CometChat.removeCallListener(listenerId);
204+
};
205+
}, [t]);
206+
184207
const _style = useMemo(() => {
185208
return {
186209
headerContainerStyle: {
@@ -266,6 +289,35 @@ export const CallDetails: React.FC<Props> = ({route, navigation}) => {
266289
[callTypeAndStatus, theme],
267290
);
268291

292+
/** Local toast view component (shows only when toastMessage set; auto hides after 3s from effect) */
293+
const ToastView = () => {
294+
if (!toastMessage) return null;
295+
return (
296+
<View
297+
style={{
298+
alignSelf: 'center',
299+
flexDirection: 'row',
300+
alignItems: 'center',
301+
borderRadius: 24,
302+
backgroundColor: 'rgba(255,59,48,0.10)',
303+
paddingVertical: theme.spacing.padding.p1,
304+
paddingHorizontal: theme.spacing.padding.p2,
305+
marginBottom: theme.spacing.margin.m3,
306+
maxWidth: '80%',
307+
}}>
308+
<Icon name="info" color={theme.color.error} size={18} />
309+
<Text
310+
style={[
311+
theme.typography.caption1.bold,
312+
{color: theme.color.error, marginLeft: theme.spacing.margin.m1},
313+
]}
314+
accessibilityRole="alert">
315+
{toastMessage}
316+
</Text>
317+
</View>
318+
);
319+
}
320+
269321
return (
270322
<View style={{flex: 1, backgroundColor: theme.color.background1}}>
271323
<View style={{flex: 1}}>
@@ -391,6 +443,9 @@ export const CallDetails: React.FC<Props> = ({route, navigation}) => {
391443
</View>
392444
)}
393445
</View>
446+
<View style={{width: '100%', paddingBottom: theme.spacing.padding.p3}}>
447+
<ToastView />
448+
</View>
394449
</View>
395450
);
396451
};

examples/SampleApp/src/components/conversations/screens/Conversations.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ const Conversations: React.FC<{}> = ({}) => {
179179
{..._conversationsConfig}
180180
AppBarOptions={NewConversation}
181181
selectionMode="none"
182+
showSearchBar={true}
183+
onSearchBarClicked={() => {
184+
navigate(SCREEN_CONSTANTS.SEARCH_MESSAGES);
185+
}}
182186
usersStatusVisibility={userAndFriendsPresence}
183187
receiptsVisibility={messageDeliveryAndReadReceipts}
184188
/>

0 commit comments

Comments
 (0)