Skip to content

Commit 9bb8e84

Browse files
Merged in bugfix/MRN-778_edit_message (pull request #237)
MRN-778 Approved-by: vanitha.g
2 parents fb76255 + e0ce639 commit 9bb8e84

File tree

15 files changed

+52
-40
lines changed

15 files changed

+52
-40
lines changed

android/app/build.gradle

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

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 ios build for MRN-947",
57+
release_notes: "React-Native ios build for MRN-908, MRN-901",
5858
apk_path: "../android/app/build/outputs/apk/release/app-release.apk",
5959
firebase_cli_token: "1//0gfTJ_oWJ0mHNCgYIARAAGBASNwF-L9IrYZM4cUIV5EB8gVnSvtMC6Q7aAtgrgG8R1ybhSY1Np_5r5UuZu28N144_weOQDyONcW4",
6060
)

ios/fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ lane :qa_firebase do
2828
firebase_app_distribution(
2929
app: "1:235373697524:ios:0e9bd66b524978a0a0c1a1",
3030
groups: "reactnative",
31-
release_notes: "React-Native ios build for MRN-947",
31+
release_notes: "React-Native ios build for MRN-908, MRN-901",
3232
firebase_cli_path: "/usr/local/bin/firebase",
3333
firebase_cli_token: "1//0g53oUKW5j5bJCgYIARAAGBASNwF-L9Ir7Ei_6NzWEsyHOMMXytlesfgXShhLeJWRwbcf2MC3e7BaC5dwYlUZB-_osuQFsxy0Du0"
3434
)

ios/mirrorfly_rn.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@
674674
"$(inherited)",
675675
"@executable_path/Frameworks",
676676
);
677-
MARKETING_VERSION = 3.2.7;
677+
MARKETING_VERSION = 3.3.1;
678678
OTHER_LDFLAGS = (
679679
"$(inherited)",
680680
"-ObjC",
@@ -707,14 +707,14 @@
707707
"$(inherited)",
708708
"@executable_path/Frameworks",
709709
);
710-
MARKETING_VERSION = 3.2.7;
710+
MARKETING_VERSION = 3.3.1;
711711
OTHER_LDFLAGS = (
712712
"$(inherited)",
713713
"-ObjC",
714714
"-lc++",
715715
);
716716
PRODUCT_BUNDLE_IDENTIFIER = com.mirrorfly.reactnativeuikit.qa;
717-
PRODUCT_NAME = mirrorfly_rn;
717+
PRODUCT_NAME = mirrorfly_rn;
718718
PROVISIONING_PROFILE_SPECIFIER = "";
719719
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "ReactNative Adhoc";
720720
SWIFT_OBJC_BRIDGING_HEADER = "mirrorfly_rn-Bridging-Header.h";

package.json

Lines changed: 1 addition & 1 deletion
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",

src/SDK/SDK.js

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

33
const SDK = global.SDK;
44

src/SDK/index.js

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

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: 4 additions & 8 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,
@@ -110,7 +108,6 @@ export const fetchMessagesFromSDK = async ({ fromUserJId, forceGetFromSDK = fals
110108
hasNextChatPage[userId] = false;
111109
return;
112110
}
113-
const page = chatPage[userId] || 1;
114111

115112
const {
116113
statusCode,
@@ -121,15 +118,12 @@ export const fetchMessagesFromSDK = async ({ fromUserJId, forceGetFromSDK = fals
121118
toJid: fromUserJId,
122119
lastMessageId,
123120
size: config.chatMessagesSizePerPage,
124-
source: 'db',
125121
});
126122
if (statusCode === 200) {
127123
let hasEqualDataFetched = data.length === config.chatMessagesSizePerPage;
128-
if (data.length && hasEqualDataFetched) {
129-
chatPage[userId] = page + 1;
130-
}
124+
131125
hasNextChatPage[userId] = hasEqualDataFetched;
132-
store.dispatch(setChatMessages({ userJid, data, forceUpdate: page === 1 }));
126+
store.dispatch(setChatMessages({ userJid, data }));
133127
}
134128
if (statusCode !== 200) {
135129
showToast(message);
@@ -529,8 +523,10 @@ export const getUserSettings = async (iq = false) => {
529523

530524
export const updateNotificationSettings = async () => {
531525
let {
526+
data,
532527
data: { archive = 0, muteNotification = false, notificationSound = true, notificationVibrate = false },
533528
} = await SDK.getUserSettings();
529+
console.log('data ==>', JSON.stringify(data, null, 2));
534530
store.dispatch(toggleArchiveSetting(Number(archive)));
535531
store.dispatch(updateNotificationSetting({ muteNotification, notificationSound, notificationVibrate }));
536532
};

src/components/ArchivedHeader.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Text from '../common/Text';
99
import { getUserIdFromJid, showToast, toggleArchive } from '../helpers/chatHelpers';
1010
import { MIX_BARE_JID } from '../helpers/constants';
1111
import { getStringSet, replacePlaceholders } from '../localization/stringSet';
12-
import { deleteRecentChats, resetChatSelections } from '../redux/recentChatDataSlice';
12+
import { clearRecentChatData, deleteRecentChats, resetChatSelections } from '../redux/recentChatDataSlice';
1313
import {
1414
getArchiveSelectedChats,
1515
getUserNameFromStore,
@@ -20,6 +20,7 @@ import { ARCHIVED_SCREEN } from '../screens/constants';
2020
import SDK from '../SDK/SDK';
2121
import commonStyles from '../styles/commonStyles';
2222
import MuteChat from './MuteChat';
23+
import { clearChatMessageData } from '../redux/chatMessageDataSlice';
2324

2425
function ArchivedHeader() {
2526
const stringSet = getStringSet();
@@ -60,13 +61,13 @@ function ArchivedHeader() {
6061
};
6162

6263
const handleRemoveClose = () => {
63-
const isUserLeft = filtered.every(res => (MIX_BARE_JID.test(res.userJid) ? res.userType === '' : true));
64-
if (!isUserLeft && filtered.length > 1) {
64+
const _isUserLeft = filtered.every(res => (MIX_BARE_JID.test(res.userJid) ? res.userType === '' : true));
65+
if (!_isUserLeft && filtered.length > 1) {
6566
toggleModalContent();
6667
return showToast(stringSet.COMMON_TEXT.YOU_ARE_A_MEMBER);
6768
}
6869

69-
if (!isUserLeft) {
70+
if (!_isUserLeft) {
7071
toggleModalContent();
7172
return showToast(stringSet.COMMON_TEXT.YOU_ARE_A_PARTICIPANT);
7273
}
@@ -75,6 +76,9 @@ function ArchivedHeader() {
7576

7677
userJids.forEach(item => {
7778
SDK.deleteChat(item);
79+
SDK.clearChat(item);
80+
dispatch(clearChatMessageData(getUserIdFromJid(item)));
81+
dispatch(clearRecentChatData(item));
7882
});
7983

8084
dispatch(deleteRecentChats(ARCHIVED_SCREEN));

0 commit comments

Comments
 (0)