diff --git a/app/assets/styles/blink/_DeleteMessageModal.scss b/app/assets/styles/blink/_DeleteMessageModal.scss
new file mode 100644
index 0000000..7136293
--- /dev/null
+++ b/app/assets/styles/blink/_DeleteMessageModal.scss
@@ -0,0 +1,52 @@
+.container {
+ padding: 10px;
+ margin: 00px;
+}
+
+.title {
+ padding: 0px;
+ font-size: 24px;
+ text-align: center;
+}
+
+.body {
+ padding: 10px;
+ font-size: 16px;
+ text-align: center;
+}
+
+.avatar {
+}
+
+.button {
+ margin: 10px;
+}
+
+.buttonRow {
+ flex-direction: row;
+ justify-content: center;
+}
+
+.checkBoxGroupRow {
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 10px;
+}
+
+.checkBoxRow {
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ margin-bottom: 10px;
+}
+
+.checkButton {
+ margin: 10px;
+ width: 70px;
+}
+
+
+.titleContainer {
+ flex-direction: row;
+}
diff --git a/app/components/DeleteMessageModal.js b/app/components/DeleteMessageModal.js
new file mode 100644
index 0000000..bd7fc97
--- /dev/null
+++ b/app/components/DeleteMessageModal.js
@@ -0,0 +1,113 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import autoBind from 'auto-bind';
+import { View, Platform } from 'react-native';
+import UserIcon from './UserIcon';
+import { Chip, Dialog, Portal, Text, Button, Surface, TextInput, Paragraph, RadioButton, Checkbox, Switch } from 'react-native-paper';
+import KeyboardAwareDialog from './KeyBoardAwareDialog';
+
+const DialogType = Platform.OS === 'ios' ? KeyboardAwareDialog : Dialog;
+
+import styles from '../assets/styles/blink/_DeleteMessageModal.scss';
+
+class DeleteMessageModal extends Component {
+ constructor(props) {
+ super(props);
+ autoBind(this);
+
+ this.state = {
+ uri: this.props.contact ? this.props.contact.uri : null,
+ displayName: this.props.contact ? this.props.contact.name : null,
+ contact: this.props.contact,
+ show: this.props.show,
+ remoteDelete: true,
+ message: this.props.message,
+ confirm: false,
+ }
+ }
+
+ UNSAFE_componentWillReceiveProps(nextProps) {
+ this.setState({show: nextProps.show,
+ uri: nextProps.contact ? nextProps.contact.uri : null,
+ displayName: nextProps.contact ? nextProps.contact.name : null,
+ confirm: nextProps.confirm,
+ contact: nextProps.contact,
+ message: nextProps.message
+ });
+ }
+
+ deleteMessage(event) {
+ event.preventDefault();
+ if (this.state.confirm || true) {
+ let id = this.state.message ? this.state.message._id : 'Unknown';
+ this.setState({confirm: false, remoteDelete: true});
+ this.props.deleteMessage(id, this.state.uri, this.state.remoteDelete);
+ this.props.close();
+ } else {
+ this.setState({confirm: true});
+ }
+ }
+
+ toggleRemoteDelete() {
+ this.setState({remoteDelete: !this.state.remoteDelete})
+ }
+
+ render() {
+
+ let identity = {uri: this.state.uri, displayName: this.state.displayName};
+ let deleteLabel = this.state.confirm || true ? 'Confirm': 'Delete';
+
+ return (
+
+
+
+
+
+
+
+
+
+ {'Delete message'}
+
+
+
+
+ Are you sure you want to delete this message?
+
+
+ {Platform.OS === 'ios' ?
+ this.toggleRemoteDelete()}/>
+ :
+ {this.toggleRemoteDelete()}}/>
+ }
+ Also delete for {this.state.displayName || this.state.uri}
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+
+DeleteMessageModal.propTypes = {
+ show : PropTypes.bool,
+ close : PropTypes.func.isRequired,
+ contact : PropTypes.object,
+ deleteMessage : PropTypes.func,
+ message : PropTypes.object
+};
+
+export default DeleteMessageModal;
diff --git a/app/components/RoundButton.js b/app/components/RoundButton.js
new file mode 100644
index 0000000..e723749
--- /dev/null
+++ b/app/components/RoundButton.js
@@ -0,0 +1,37 @@
+import React from 'react';
+import { StyleSheet, Text, View, TouchableHighlight } from 'react-native';
+import { IconButton } from 'react-native-paper';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent:"center",
+ alignItems:"center"
+ },
+ item: {
+ alignSelf: "center",
+ color:"white"
+ },
+ roundshape: {
+ backgroundColor: 'lightgreen',
+ height: 44, //any of height
+ width: 44, //any of width
+ justifyContent:"center",
+ borderRadius: 22 // it will be height/2
+ }
+});
+
+const RoundBtn = () => {
+ return (
+
+
+
+
+
+ );
+}
+
+export default RoundBtn;
diff --git a/patches/react-native-audio-recorder-player+3.5.3.patch b/patches/react-native-audio-recorder-player+3.5.3.patch
new file mode 100644
index 0000000..9d8f90d
--- /dev/null
+++ b/patches/react-native-audio-recorder-player+3.5.3.patch
@@ -0,0 +1,10 @@
+diff --git a/node_modules/react-native-audio-recorder-player/index.ts b/node_modules/react-native-audio-recorder-player/index.ts
+index d6a8551..c1e5444 100644
+--- a/node_modules/react-native-audio-recorder-player/index.ts
++++ b/node_modules/react-native-audio-recorder-player/index.ts
+@@ -1,4 +1,4 @@
+-import type {EmitterSubscription} from 'react-native';
++import {EmitterSubscription} from 'react-native';
+ import {
+ DeviceEventEmitter,
+ NativeEventEmitter,
diff --git a/patches/react-native-gifted-chat+0.16.3.patch.old b/patches/react-native-gifted-chat+0.16.3.patch.old
new file mode 100644
index 0000000..8c2fd48
--- /dev/null
+++ b/patches/react-native-gifted-chat+0.16.3.patch.old
@@ -0,0 +1,45 @@
+diff --git a/node_modules/react-native-gifted-chat/lib/Time.js b/node_modules/react-native-gifted-chat/lib/Time.js
+index 24b06cc..54268fc 100644
+--- a/node_modules/react-native-gifted-chat/lib/Time.js
++++ b/node_modules/react-native-gifted-chat/lib/Time.js
+@@ -5,6 +5,8 @@ import dayjs from 'dayjs';
+ import Color from './Color';
+ import { TIME_FORMAT } from './Constant';
+ import { StylePropType } from './utils';
++import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
++
+ const containerStyle = {
+ marginLeft: 10,
+ marginRight: 10,
+@@ -38,11 +40,13 @@ const styles = {
+ export default class Time extends Component {
+ render() {
+ const { position, containerStyle, currentMessage, timeFormat, timeTextStyle, } = this.props;
++ let lockColor = currentMessage.direction === "incoming" ? "gray" : "white";
+ if (!!currentMessage) {
+ return (
++
+
++ {currentMessage.encrypted > 0 ? : null}
++
++
+ );
+ }
+ return null;
+@@ -76,6 +83,7 @@ Time.propTypes = {
+ right: StylePropType,
+ }),
+ timeFormat: PropTypes.string,
++ lockStyle: PropTypes,
+ timeTextStyle: PropTypes.shape({
+ left: StylePropType,
+ right: StylePropType,
diff --git a/patches/react-native-gifted-chat+2.1.0.patch b/patches/react-native-gifted-chat+2.1.0.patch
new file mode 100644
index 0000000..a6eb3de
--- /dev/null
+++ b/patches/react-native-gifted-chat+2.1.0.patch
@@ -0,0 +1,25 @@
+diff --git a/node_modules/react-native-gifted-chat/lib/Composer.js b/node_modules/react-native-gifted-chat/lib/Composer.js
+index 7bbf561..c44fa9d 100644
+--- a/node_modules/react-native-gifted-chat/lib/Composer.js
++++ b/node_modules/react-native-gifted-chat/lib/Composer.js
+@@ -23,7 +23,7 @@ const styles = StyleSheet.create({
+ web: 6,
+ }),
+ marginBottom: Platform.select({
+- ios: 5,
++ ios: 1,
+ android: 3,
+ web: 4,
+ }),
+diff --git a/node_modules/react-native-gifted-chat/lib/Message.js b/node_modules/react-native-gifted-chat/lib/Message.js
+index 6202ad9..d3d446f 100644
+--- a/node_modules/react-native-gifted-chat/lib/Message.js
++++ b/node_modules/react-native-gifted-chat/lib/Message.js
+@@ -41,6 +41,7 @@ export default class Message extends React.Component {
+ next.pending !== current.pending ||
+ next.createdAt !== current.createdAt ||
+ next.text !== current.text ||
++ next.metadata != current.metadata ||
+ next.image !== current.image ||
+ next.video !== current.video ||
+ next.audio !== current.audio ||
diff --git a/patches/react-native-push-notification+8.1.1.patch b/patches/react-native-push-notification+8.1.1.patch
new file mode 100644
index 0000000..2ac7684
--- /dev/null
+++ b/patches/react-native-push-notification+8.1.1.patch
@@ -0,0 +1,93 @@
+diff --git a/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java b/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java
+index 248ff08..51708bc 100644
+--- a/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java
++++ b/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java
+@@ -412,7 +412,8 @@ public class RNPushNotificationHelper {
+ notification.setStyle(style);
+
+ Intent intent = new Intent(context, intentClass);
+- intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
++ intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION | Intent.FLAG_ACTIVITY_NEW_TASK);
++ //intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ bundle.putBoolean("foreground", this.isApplicationInForeground());
+ bundle.putBoolean("userInteraction", true);
+ intent.putExtra("notification", bundle);
+@@ -425,7 +426,7 @@ public class RNPushNotificationHelper {
+
+ Uri soundUri = null;
+
+- if (!bundle.containsKey("playSound") || bundle.getBoolean("playSound")) {
++ if (bundle.containsKey("playSound") || bundle.getBoolean("playSound")) {
+ String soundName = bundle.getString("soundName");
+
+ soundUri = getSoundUri(soundName);
+@@ -462,7 +463,7 @@ public class RNPushNotificationHelper {
+
+ long[] vibratePattern = new long[]{0};
+
+- if (!bundle.containsKey("vibrate") || bundle.getBoolean("vibrate")) {
++ if (bundle.containsKey("vibrate") || bundle.getBoolean("vibrate")) {
+ long vibration = bundle.containsKey("vibration") ? (long) bundle.getDouble("vibration") : DEFAULT_VIBRATION;
+ if (vibration == 0)
+ vibration = DEFAULT_VIBRATION;
+@@ -498,6 +499,14 @@ public class RNPushNotificationHelper {
+ notification.setChannelId(channel_id);
+ notification.setContentIntent(pendingIntent);
+
++ if (bundle.containsKey("fullScreen") && bundle.getBoolean("fullScreen")) {
++ notification.setFullScreenIntent(pendingIntent, true);
++ }
++
++ if (bundle.containsKey("loopSound") && bundle.getBoolean("loopSound")) {
++ //notification.flags |= Notification.FLAG_INSISTENT;
++ }
++
+ JSONArray actionsArray = null;
+ try {
+ actionsArray = bundle.getString("actions") != null ? new JSONArray(bundle.getString("actions")) : null;
+@@ -880,7 +889,7 @@ public class RNPushNotificationHelper {
+ manager.deleteNotificationChannel(channel_id);
+ }
+
+- private boolean checkOrCreateChannel(NotificationManager manager, String channel_id, String channel_name, String channel_description, Uri soundUri, int importance, long[] vibratePattern) {
++ private boolean checkOrCreateChannel(NotificationManager manager, String channel_id, String channel_name, String channel_description, Uri soundUri, int importance, long[] vibratePattern, boolean isRingtone) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
+ return false;
+ if (manager == null)
+@@ -905,10 +914,14 @@ public class RNPushNotificationHelper {
+ channel.enableVibration(vibratePattern != null);
+ channel.setVibrationPattern(vibratePattern);
+
++ if (isRingtone) {
++ soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
++ }
++
+ if (soundUri != null) {
+ AudioAttributes audioAttributes = new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+- .setUsage(AudioAttributes.USAGE_NOTIFICATION)
++ .setUsage(isRingtone ? AudioAttributes.USAGE_NOTIFICATION_RINGTONE : AudioAttributes.USAGE_NOTIFICATION)
+ .build();
+
+ channel.setSound(soundUri, audioAttributes);
+@@ -931,17 +944,18 @@ public class RNPushNotificationHelper {
+ String channelId = channelInfo.getString("channelId");
+ String channelName = channelInfo.getString("channelName");
+ String channelDescription = channelInfo.hasKey("channelDescription") ? channelInfo.getString("channelDescription") : "";
+- boolean playSound = !channelInfo.hasKey("playSound") || channelInfo.getBoolean("playSound");
++ boolean playSound = channelInfo.hasKey("playSound") || channelInfo.getBoolean("playSound");
+ String soundName = channelInfo.hasKey("soundName") ? channelInfo.getString("soundName") : "default";
+ int importance = channelInfo.hasKey("importance") ? channelInfo.getInt("importance") : 4;
+ boolean vibrate = channelInfo.hasKey("vibrate") && channelInfo.getBoolean("vibrate");
++ boolean isRingtone = channelInfo.hasKey("isRingtone") && channelInfo.getBoolean("isRingtone");
+ long[] vibratePattern = vibrate ? new long[] { 0, DEFAULT_VIBRATION } : null;
+
+ NotificationManager manager = notificationManager();
+
+ Uri soundUri = playSound ? getSoundUri(soundName) : null;
+
+- return checkOrCreateChannel(manager, channelId, channelName, channelDescription, soundUri, importance, vibratePattern);
++ return checkOrCreateChannel(manager, channelId, channelName, channelDescription, soundUri, importance, vibratePattern, isRingtone);
+ }
+
+ public boolean isApplicationInForeground() {
diff --git a/patches/react-native-receive-sharing-intent+2.0.0.patch b/patches/react-native-receive-sharing-intent+2.0.0.patch
new file mode 100644
index 0000000..b489834
--- /dev/null
+++ b/patches/react-native-receive-sharing-intent+2.0.0.patch
@@ -0,0 +1,51 @@
+diff --git a/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java b/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
+index f752144..b70138e 100644
+--- a/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
++++ b/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
+@@ -18,6 +18,7 @@ public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule {
+
+ private final ReactApplicationContext reactContext;
+ private ReceiveSharingIntentHelper receiveSharingIntentHelper;
++ private Intent oldIntent; // <-- add this line
+
+ public ReceiveSharingIntentModule(ReactApplicationContext reactContext) {
+ super(reactContext);
+@@ -30,6 +31,7 @@ public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule {
+ protected void onNewIntent(Intent intent) {
+ Activity mActivity = getCurrentActivity();
+ if(mActivity == null) { return; }
++ oldIntent = mActivity.getIntent(); // <-- add this line
+ mActivity.setIntent(intent);
+ }
+
+@@ -40,7 +42,9 @@ public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule {
+ if(mActivity == null) { return; }
+ Intent intent = mActivity.getIntent();
+ receiveSharingIntentHelper.sendFileNames(reactContext, intent, promise);
+- mActivity.setIntent(null);
++ if (oldIntent != null) { // <-- add this line
++ mActivity.setIntent(oldIntent); // <-- change this line from mActivity.setIntent(null);
++ } // <-- add this line
+ }
+
+ @ReactMethod
+diff --git a/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts b/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
+index 735c191..ca6dd7b 100644
+--- a/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
++++ b/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
+@@ -1,4 +1,4 @@
+-import type { IReceiveSharingIntent, IUtils } from "./ReceiveSharingIntent.interfaces";
++import { IReceiveSharingIntent, IUtils } from "./ReceiveSharingIntent.interfaces";
+ import { Platform, Linking, AppState, NativeModules } from "react-native";
+ import Utils from "./utils";
+
+diff --git a/node_modules/react-native-receive-sharing-intent/src/utils.ts b/node_modules/react-native-receive-sharing-intent/src/utils.ts
+index 34d3091..d3b3b13 100644
+--- a/node_modules/react-native-receive-sharing-intent/src/utils.ts
++++ b/node_modules/react-native-receive-sharing-intent/src/utils.ts
+@@ -1,4 +1,4 @@
+-import type { IReturnData, IUtils } from "./ReceiveSharingIntent.interfaces";
++import { IReturnData, IUtils } from "./ReceiveSharingIntent.interfaces";
+ import MimeTypes from './mimeTypes';
+
+ class Utils implements IUtils{