Skip to content

Commit b3800d3

Browse files
Merge remote-tracking branch 'upstream/master' into feature/update-2.1.0
2 parents 7d3003b + ca1ada2 commit b3800d3

27 files changed

+278
-204
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ android {
9797
minSdkVersion rootProject.ext.minSdkVersion
9898
targetSdkVersion rootProject.ext.targetSdkVersion
9999
versionCode 1
100-
versionName "3.2.7"
100+
versionName "3.3.3"
101101
/** Add this for react-native-camera */
102102
missingDimensionStrategy 'react-native-camera', 'general'
103103
multiDexEnabled true

ios/mirrorfly_rn.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
"$(inherited)",
561561
"@executable_path/Frameworks",
562562
);
563-
MARKETING_VERSION = 3.0.16;
563+
MARKETING_VERSION = 3.3.3;
564564
OTHER_LDFLAGS = (
565565
"$(inherited)",
566566
"-ObjC",
@@ -593,13 +593,13 @@
593593
"$(inherited)",
594594
"@executable_path/Frameworks",
595595
);
596-
MARKETING_VERSION = 3.0.16;
596+
MARKETING_VERSION = 3.3.3;
597597
OTHER_LDFLAGS = (
598598
"$(inherited)",
599599
"-ObjC",
600600
"-lc++",
601601
);
602-
PRODUCT_BUNDLE_IDENTIFIER = com.mirrorfly.qa;
602+
PRODUCT_BUNDLE_IDENTIFIER = com.mirrorfly.reactnativeuikit.qa;
603603
PRODUCT_NAME = mirrorfly_rn;
604604
PROVISIONING_PROFILE_SPECIFIER = "";
605605
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Mirror Fly Qa Inhouse Profile";

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mirrorfly-uikit-react-native",
3-
"version": "1.5.0",
3+
"version": "2.1.0",
44
"description": "React-Native based UI kit for Mirrorfly",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
@@ -29,7 +29,6 @@
2929
"@react-native-community/checkbox": "^0.5.17",
3030
"@react-native-community/netinfo": "^11.4.1",
3131
"@react-native-firebase/app": "~21.6.2",
32-
"@react-native-firebase/crashlytics": "~21.6.2",
3332
"@react-native-firebase/messaging": "~21.6.2",
3433
"@react-native/babel-preset": "0.75.4",
3534
"@react-native/eslint-config": "0.75.4",

rollup.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export default {
6060
'react-native-progress',
6161
'react-native-safe-area-context',
6262
'react-native-screens',
63-
'react-native-simple-toast',
6463
'react-native-sound',
6564
'react-native-svg',
6665
'react-native-svg-transformer',
@@ -82,7 +81,6 @@ export default {
8281
'react-native-material-menu',
8382
'react-native-keyevent',
8483
'react-native-ringer-mode',
85-
'react-native-simple-toast',
8684
],
8785
plugins: [
8886
replace({

src/Navigation/stackNavigation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
22
import React from 'react';
33
import { Provider } from 'react-redux';
44
import VideoPlayer from '../Media/VideoPlayer';
5+
import AlertModalRoot from '../common/AlertModalRoot';
6+
import ToastMessage from '../common/ToastMessage';
57
import store from '../redux/store';
68
import ArchivedScreen from '../screens/ArchivedScreen';
79
import BlockedContactListScreen from '../screens/BlockedContactListScreen';
@@ -71,7 +73,6 @@ import {
7173
VIEWALLMEDIA,
7274
} from '../screens/constants';
7375
import { getCurrentScreen } from '../uikitMethods';
74-
import ToastMessage from '../common/ToastMessage';
7576

7677
const Stack = createNativeStackNavigator();
7778

@@ -182,6 +183,7 @@ function StackNavigationPage() {
182183
<Stack.Screen name={GROUP_STACK}>{prop => <GroupScreenStackNavigation {...prop} />}</Stack.Screen>
183184
</Stack.Navigator>
184185
<ToastMessage />
186+
<AlertModalRoot />
185187
</Provider>
186188
);
187189
}

src/SDK/sdkCallBacks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export const callBacks = {
709709
store.dispatch(addChatMessageItem(res));
710710
}
711711

712-
if (isShowNotification) {
712+
if (isShowNotification && !res?.editMessageId) {
713713
pushNotify(res.msgId, getNotifyNickName(res), getNotifyMessage(res), res?.fromUserJid);
714714
}
715715
break;

src/SDK/utils.js

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import config from '../config/config';
44
import {
55
calculateWidthAndHeight,
66
getCurrentChatUser,
7-
getThumbImage,
87
getUserIdFromJid,
9-
getVideoThumbImage,
108
handleConversationScollToBottom,
119
handleUploadNextImage,
1210
isLocalUser,
@@ -96,47 +94,41 @@ export const fetchContactsFromSDK = async (_searchText, _pageNumber, _limit) =>
9694
};
9795

9896
export const fetchMessagesFromSDK = async ({ fromUserJId, forceGetFromSDK = false, pageReset = false }) => {
99-
try {
100-
const userId = getUserIdFromJid(fromUserJId);
101-
const messsageList = getChatMessages(userId) || [];
102-
if (messsageList.length && !forceGetFromSDK) {
103-
return;
104-
}
105-
if (pageReset) {
106-
delete chatPage[userId];
107-
}
108-
const lastMessageId = messsageList[messsageList.length - 1]?.msgId || '';
109-
console.log('lastMessageId ==>', messsageList.length, messsageList.length - 1, lastMessageId);
110-
if (lastMessageId.includes('groupCreated')) {
111-
hasNextChatPage[userId] = false;
112-
return;
113-
}
114-
const page = chatPage[userId] || 1;
115-
116-
const {
117-
statusCode,
118-
userJid,
119-
data = [],
120-
message,
121-
} = await SDK.getChatMessages({
122-
toJid: fromUserJId,
123-
lastMessageId,
124-
size: config.chatMessagesSizePerPage,
125-
source: 'db',
126-
});
127-
if (statusCode === 200) {
128-
let hasEqualDataFetched = data.length === config.chatMessagesSizePerPage;
129-
if (data.length && hasEqualDataFetched) {
130-
chatPage[userId] = page + 1;
131-
}
132-
hasNextChatPage[userId] = hasEqualDataFetched;
133-
store.dispatch(setChatMessages({ userJid, data, forceUpdate: page === 1 }));
134-
}
135-
if (statusCode !== 200) {
136-
showToast(message);
137-
}
138-
return data;
139-
} catch (error) {}
97+
const userId = getUserIdFromJid(fromUserJId);
98+
const messsageList = getChatMessages(userId) || [];
99+
if (messsageList.length && !forceGetFromSDK) {
100+
return;
101+
}
102+
if (pageReset) {
103+
delete chatPage[userId];
104+
}
105+
const lastMessageId = messsageList[messsageList.length - 1]?.msgId || '';
106+
console.log('lastMessageId ==>', messsageList.length, messsageList.length - 1, lastMessageId);
107+
if (lastMessageId.includes('groupCreated')) {
108+
hasNextChatPage[userId] = false;
109+
return;
110+
}
111+
112+
const {
113+
statusCode,
114+
userJid,
115+
data = [],
116+
message,
117+
} = await SDK.getChatMessages({
118+
toJid: fromUserJId,
119+
lastMessageId,
120+
size: config.chatMessagesSizePerPage,
121+
});
122+
if (statusCode === 200) {
123+
let hasEqualDataFetched = data.length === config.chatMessagesSizePerPage;
124+
125+
hasNextChatPage[userId] = hasEqualDataFetched;
126+
store.dispatch(setChatMessages({ userJid, data }));
127+
}
128+
if (statusCode !== 200) {
129+
showToast(message);
130+
}
131+
return data;
140132
};
141133

142134
const sendMediaMessage = async (messageType, files, chatType, toUserJid, replyTo) => {
@@ -531,8 +523,10 @@ export const getUserSettings = async (iq = false) => {
531523

532524
export const updateNotificationSettings = async () => {
533525
let {
526+
data,
534527
data: { archive = 0, muteNotification = false, notificationSound = true, notificationVibrate = false },
535528
} = await SDK.getUserSettings();
529+
console.log('data ==>', JSON.stringify(data, null, 2));
536530
store.dispatch(toggleArchiveSetting(Number(archive)));
537531
store.dispatch(updateNotificationSetting({ muteNotification, notificationSound, notificationVibrate }));
538532
};

src/calls/components/BigVideoTile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const BigVideoTile = ({
7575
{/* Pulse animation view here */}
7676
<PulseAnimatedView animateToValue={1.3} baseStyle={styles.avatharPulseAnimatedView} />
7777
<Avathar
78+
userId={userId}
7879
width={90}
7980
height={90}
8081
backgroundColor={userProfile.colorCode}

src/calls/components/SmallVideoTile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const SmallVideoTile = ({
5454
<>
5555
<View style={styles.smallVideoUserAvathar}>
5656
<Avathar
57+
userId={userId}
5758
width={50}
5859
height={50}
5960
backgroundColor={userProfile.colorCode}

src/calls/screens/IncomingCall.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const IncomingCall = ({ userId, userJid, callStatus }) => {
9696
</Text>
9797
<View style={commonStyles.marginTop_15}>
9898
<Avathar
99+
userId={userId}
99100
width={90}
100101
height={90}
101102
backgroundColor={userProfile.colorCode}

0 commit comments

Comments
 (0)