Skip to content

Commit 9afa1bf

Browse files
karthikeyan-se-contushariramc
authored andcommitted
Merged in redux_develop (pull request #188)
MRN-756,MRN-758, MRN-744, MRN-729, MRN-699, MRN-690 Approved-by: Hariram Chandrasekaran
2 parents 0061d08 + 7f92db6 commit 9afa1bf

File tree

21 files changed

+7735
-7635
lines changed

21 files changed

+7735
-7635
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ android {
8282
minSdkVersion rootProject.ext.minSdkVersion
8383
targetSdkVersion rootProject.ext.targetSdkVersion
8484
versionCode 1
85-
versionName "2.4.33"
85+
versionName "2.4.34"
8686
/** Add this for react-native-camera */
8787
missingDimensionStrategy 'react-native-camera', 'general'
8888
multiDexEnabled true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"project_info": {
3+
"project_number": "686921706810",
4+
"project_id": "thecollectiveapp-1dbc9",
5+
"storage_bucket": "thecollectiveapp-1dbc9.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:686921706810:android:759989ce574808dacab403",
11+
"android_client_info": {
12+
"package_name": "com.thecollective.collective"
13+
}
14+
},
15+
"oauth_client": [],
16+
"api_key": [
17+
{
18+
"current_key": "AIzaSyA7Rv3gN-Tq3vJECbGVSiV_Rp49N6jPBD4"
19+
}
20+
],
21+
"services": {
22+
"appinvite_service": {
23+
"other_platform_oauth_client": []
24+
}
25+
}
26+
}
27+
],
28+
"configuration_version": "1"
29+
}

android/fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ platform :android do
5454
firebase_app_distribution(
5555
app: "1:235373697524:android:8b3becf8d8ff9be3a0c1a1",
5656
groups: "reactnative",
57-
release_notes: "React-Native android build for bug-fixes MRN-759",
57+
release_notes: "React-Native android build for bug-fixes MRN-756,MRN-758, MRN-744, MRN-729, MRN-699, MRN-690",
5858
apk_path: "../android/app/build/outputs/apk/release/app-release.apk",
5959
firebase_cli_token: "1//0gfTJ_oWJ0mHNCgYIARAAGBASNwF-L9IrYZM4cUIV5EB8gVnSvtMC6Q7aAtgrgG8R1ybhSY1Np_5r5UuZu28N144_weOQDyONcW4",
6060
)

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import { AppRegistry, Platform } from 'react-native';
66
import App from './App';
77
import { name as appName } from './app.json';
88
import config from './src/config/config';
9-
import { mirrorflyInitialize, mirrorflyNotificationHandler, setupCallScreen } from './src/uikitMethods';
9+
import { MIRRORFLY_RN } from './src/helpers/constants';
10+
import { mirrorflyInitialize, mirrorflyNotificationHandler, setAppConfig, setupCallScreen } from './src/uikitMethods';
11+
12+
setAppConfig({ appSchema: MIRRORFLY_RN });
1013

1114
/**
1215
// import { startNetworkLogging } from 'react-native-network-logger';

ios/fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ lane :qa_firebase do
2929
firebase_app_distribution(
3030
app: "1:695832127329:ios:f8b6b0fab296a800",
3131
groups: "reactnative",
32-
release_notes: "React-Native ios build for bug-fixes MRN-759",
32+
release_notes: "React-Native ios build for bug-fixes MRN-756,MRN-758, MRN-744, MRN-729, MRN-699, MRN-690",
3333
firebase_cli_path: "/usr/local/bin/firebase",
3434
firebase_cli_token: "1//0g53oUKW5j5bJCgYIARAAGBASNwF-L9Ir7Ei_6NzWEsyHOMMXytlesfgXShhLeJWRwbcf2MC3e7BaC5dwYlUZB-_osuQFsxy0Du0"
3535
)

ios/mirrorfly_rn.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
"$(inherited)",
653653
"@executable_path/Frameworks",
654654
);
655-
MARKETING_VERSION = 2.4.33;
655+
MARKETING_VERSION = 2.4.34;
656656
OTHER_LDFLAGS = (
657657
"$(inherited)",
658658
"-ObjC",
@@ -688,7 +688,7 @@
688688
"$(inherited)",
689689
"@executable_path/Frameworks",
690690
);
691-
MARKETING_VERSION = 2.4.33;
691+
MARKETING_VERSION = 2.4.34;
692692
OTHER_LDFLAGS = (
693693
"$(inherited)",
694694
"-ObjC",

src/MirrorflyChatComponent.js

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { NavigationContainer } from '@react-navigation/native';
22
import React from 'react';
3-
import { SafeAreaView, StatusBar, Text, View } from 'react-native';
3+
import { Linking, SafeAreaView, StatusBar, Text, View } from 'react-native';
44
import { navigationRef } from './Navigation/rootNavigation';
55
import StackNavigationPage from './Navigation/stackNavigation';
66
import ApplicationColors from './config/appColors';
77
import {
88
ARCHIVED_SCREEN,
9+
CONVERSATION_SCREEN,
910
CONVERSATION_STACK,
1011
COUNTRY_LIST_SCREEN,
1112
PROFILE_SCREEN,
@@ -23,7 +24,11 @@ const linking = {
2324
screens: {
2425
[REGISTERSCREEN]: REGISTERSCREEN,
2526
[PROFILE_SCREEN]: PROFILE_SCREEN,
26-
[CONVERSATION_STACK]: CONVERSATION_STACK,
27+
[CONVERSATION_STACK]: {
28+
screens: {
29+
[CONVERSATION_SCREEN]: CONVERSATION_SCREEN, // This should match the path used in the deep link
30+
},
31+
},
2732
[RECENTCHATSCREEN]: RECENTCHATSCREEN,
2833
[COUNTRY_LIST_SCREEN]: COUNTRY_LIST_SCREEN,
2934
[USERS_LIST_SCREEN]: USERS_LIST_SCREEN,
@@ -34,6 +39,42 @@ const linking = {
3439
};
3540

3641
export function MirrorflyChatComponent() {
42+
React.useEffect(() => {
43+
const handleDeepLink = ({ url }) => {
44+
if (url) {
45+
const route = url.replace(getAppSchema(), '');
46+
const queryString = route.split('?')[1];
47+
// Manually parse the query string
48+
const params = {};
49+
if (queryString) {
50+
queryString.split('&').forEach(param => {
51+
const [key, value] = param.split('=');
52+
params[key] = decodeURIComponent(value);
53+
});
54+
}
55+
const { jid } = params;
56+
setTimeout(() => {
57+
navigationRef.current?.navigate(CONVERSATION_STACK, {
58+
screen: CONVERSATION_SCREEN,
59+
params: { jid },
60+
});
61+
}, 10);
62+
}
63+
};
64+
65+
Linking.getInitialURL().then(url => {
66+
if (url) {
67+
handleDeepLink({ url });
68+
}
69+
});
70+
71+
const linkingListener = Linking.addEventListener('url', handleDeepLink);
72+
73+
return () => {
74+
linkingListener.remove();
75+
};
76+
}, []);
77+
3778
if (!getAppInitStatus()) {
3879
return (
3980
<SafeAreaView style={{ flex: 1, backgroundColor: ApplicationColors.headerBg }}>

src/SDK/SDK.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'mirrorfly-reactnative-sdk';
1+
import './index';
22

33
const SDK = global.SDK;
44

src/SDK/index.js

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

src/calls/notification/callNotifyHandler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ import { answerIncomingCall, declineIncomingCall, endOnGoingCall } from '../../H
2222
import SDK from '../../SDK/SDK';
2323
import { getChannelIds } from '../../Service/PushNotify';
2424
import { removeAllDeliveredNotification } from '../../Service/remoteNotifyHandle';
25+
import { getUserIdFromJid } from '../../helpers/chatHelpers';
2526
import { callDurationTimestamp } from '../../redux/callStateSlice';
2627
import { resetNotificationData, setNotificationData } from '../../redux/notificationDataSlice';
28+
import { setRoasterData } from '../../redux/rosterDataSlice';
2729
import store from '../../redux/store';
2830
import { CONVERSATION_SCREEN, CONVERSATION_STACK } from '../../screens/constants';
2931
import { getAppSchema } from '../../uikitMethods';
@@ -281,7 +283,7 @@ export const onChatNotificationBackGround = async ({ type, detail }) => {
281283
const {
282284
notification: { data: { fromUserJID = '', from_user = '' } = '' },
283285
} = detail;
284-
const push_url = getAppSchema() + 'CONVERSATION_STACK?fromUserJID=' + fromUserJID || from_user;
286+
const push_url = getAppSchema() + `${CONVERSATION_STACK}/${CONVERSATION_SCREEN}?jid=${fromUserJID || from_user}`;
285287
const { statusCode, data = {} } = await SDK.getUserProfile(getUserIdFromJid(fromUserJID || from_user));
286288
if (statusCode === 200) {
287289
const { userId = '' } = data;

0 commit comments

Comments
 (0)