Skip to content

Commit 1cc0d64

Browse files
authored
Merge pull request #16 from cometchat-pro/v2.2.1-1
v2.2.1
2 parents 8e2c9c8 + 76d9a60 commit 1cc0d64

File tree

224 files changed

+1956
-2020
lines changed

Some content is hidden

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

224 files changed

+1956
-2020
lines changed

CometChatWorkspace/cometchat-app/App.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ import {
1313
Platform,
1414
} from 'react-native';
1515
import {PersistGate} from 'redux-persist/integration/react';
16-
import theme from './react-native-chat-ui-kit/src/resources/theme';
17-
18-
const styles = StyleSheet.create({
19-
defaultFontFamily: {
20-
fontFamily: theme.fontFamily,
21-
},
22-
});
16+
import theme from './cometchat-pro-react-native-ui-kit/src/resources/theme';
17+
18+
const styles = StyleSheet.create({
19+
defaultFontFamily: {
20+
fontFamily: theme.fontFamily,
21+
},
22+
});
2323

2424
const customProps = {style: styles.defaultFontFamily};
2525

2626
// To set default font family, avoiding issues with specific android fonts like OnePlus Slate
2727
function setDefaultFontFamily() {
28-
const TextRender = Text.render;
29-
const initialDefaultProps = Text.defaultProps;
30-
Text.defaultProps = {
31-
...initialDefaultProps,
32-
...customProps,
33-
};
34-
Text.render = function render(props) {
35-
let oldProps = props;
36-
props = {...props, style: [customProps.style, props.style]};
37-
try {
38-
return TextRender.apply(this, arguments);
39-
} finally {
40-
props = oldProps;
41-
}
42-
};
43-
}
28+
const TextRender = Text.render;
29+
const initialDefaultProps = Text.defaultProps;
30+
Text.defaultProps = {
31+
...initialDefaultProps,
32+
...customProps,
33+
};
34+
Text.render = function render(props) {
35+
let oldProps = props;
36+
props = {...props, style: [customProps.style, props.style]};
37+
try {
38+
return TextRender.apply(this, arguments);
39+
} finally {
40+
props = oldProps;
41+
}
42+
};
43+
}
4444

4545
const App = () => {
4646
LogBox.ignoreAllLogs();
@@ -50,7 +50,7 @@ const App = () => {
5050
.build();
5151

5252
useEffect(() => {
53-
console.log("init***")
53+
console.log('init***');
5454
CometChat.init(COMETCHAT_CONSTANTS.APP_ID, appSetting).catch(() => {
5555
return null;
5656
});
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const COMETCHAT_CONSTANTS = {
2-
APP_ID: "APP_ID",
3-
REGION: "REGION",
4-
AUTH_KEY: "AUTH_KEY",
2+
APP_ID: 'APP_ID',
3+
REGION: 'REGION',
4+
AUTH_KEY: 'AUTH_KEY',
55
};

CometChatWorkspace/cometchat-app/StackNavigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
CometChatGroupList,
1616
CometChatConversationListWithMessages,
1717
CometChatConversationList,
18-
} from './react-native-chat-ui-kit';
18+
} from './cometchat-pro-react-native-ui-kit';
1919

2020
function StackNavigator(props) {
2121
const Stack = createStackNavigator();

CometChatWorkspace/cometchat-app/react-native-chat-ui-kit/README.md renamed to CometChatWorkspace/cometchat-app/cometchat-pro-react-native-ui-kit/README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Before you begin, ensure you have met the following requirements:
4141

4242

4343

44+
4445
|<div align="left"><span>**Note:**<span style="font-weight:500"> Support for Expo CLI based apps.</span> </span></div> |
4546
|-----------------------------------------|
4647
|If you are using Expo CLI to build a React Native app, the calling component will not work as our calling component needs native-level changes.However, you can create a React Native app using React Native CLI or use the 'expo eject' command to convert your app from an expo-managed workflow to a bare workflow.|
47-
4848
---
4949

5050
## Installing CometChat React Native UI Kit
@@ -61,7 +61,7 @@ To install React-Native UI Kit, you need to first register on CometChat Dashboar
6161
### ii. Add the CometChat Dependency
6262

6363
```javascript
64-
npm install @cometchat-pro/react-native-chat@2.2.0 --save
64+
npm install @cometchat-pro/react-native-chat@2.2.1 --save
6565
```
6666

6767
### iii. Other required DEPENDENCIES
@@ -85,8 +85,13 @@ These packages help make the ui-kit smooth and functioning
8585
[@react-native-picker/picker](https://github.com/react-native-picker/picker)</br>
8686
[react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage)</br>
8787
[@cometchat-pro/react-native-calls](https://www.npmjs.com/package/@cometchat-pro/react-native-calls)</br>
88+
[rn-fetch-blob](https://www.npmjs.com/package/rn-fetch-blob)</br>
89+
[react-native-autolink](https://www.npmjs.com/package/react-native-autolink)</br>
90+
[react-native-screens](https://www.npmjs.com/package/react-native-screens)</br>
91+
[emoji-mart-native](https://www.npmjs.com/package/emoji-mart-native)</br>
8892
<br/>
8993

94+
9095
## 2. Configure CometChat inside your app
9196

9297
### i. Initialize CometChat 🌟
@@ -161,28 +166,20 @@ CometChat.login(uid, authKey).then(
161166

162167
Usage of application in project
163168

164-
```html
165-
import {CometChatUI} from './react-native-chat-ui-kit';
166-
167-
function StackNavigator(props) {
168-
const Stack = createStackNavigator();
169+
```javascript
170+
import React from 'react';
171+
import {View} from 'react-native';
172+
import {CometChatUI} from '../cometchat-pro-react-native-ui-kit';
169173

174+
export default function CometChatUIView() {
170175
return (
171-
<NavigationContainer>
172-
<Stack.Navigator
173-
headerMode="none"
174-
initialRouteName={props.isLoggedIn ? 'HomePage' : null}>
175-
<Stack.Screen name="LoginPage" component={LoginPage} />
176-
<Stack.Screen name="HomePage" component={HomePage} />
177-
<Stack.Screen
178-
name="CometChatUI"
179-
component={CometChatUI}
180-
/>
181-
</Stack.Navigator>
182-
</NavigationContainer>
176+
<View style={{flex: 1}}>
177+
<CometChatUI />
178+
</View>
183179
);
184180
}
185181

182+
186183
```
187184

188185
---
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,18 @@
11
{
22
"name": "cometchat-pro-react-native-ui-kit",
3-
"version": "2.2.0",
3+
"version": "2.2.1-1",
44
"description": "Chat UI Kit for React Native App",
55
"main": "./src/index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"lint": "eslint 'src/**/*.{js,jsx}' --quiet --fix"
99
},
10-
"husky": {
11-
"hooks": {
12-
"pre-commit": "lint-staged"
13-
}
14-
},
15-
"lint-staged": {
16-
"*.{js,jsx}": [
17-
"npm run lint",
18-
"git add --all"
19-
],
20-
"*.json": [
21-
"git add --all"
22-
]
23-
},
2410
"repository": {
2511
"type": "git",
2612
"url": "[email protected]:cometchat/react-native.git"
2713
},
2814
"peerDependencies": {
2915
"@react-native-community/async-storage": "^1.12.1",
30-
"@react-native-async-storage/async-storage": "^1.13.4",
31-
"@react-native-picker/picker": "^1.9.4",
3216
"react-native-sound": "^0.11.0",
3317
"react-native-vector-icons": "^7.1.0",
3418
"react-native-elements": "^3.0.0-alpha.1",
@@ -38,20 +22,13 @@
3822
"react-native": "^0.63.3",
3923
"react-native-gesture-handler": "^1.9.0",
4024
"react-native-reanimated": "^1.13.2",
41-
"react-native-screens": "^2.16.1",
4225
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
4326
"react-native-video": "^5.1.0-alpha8",
4427
"react": "^16.0.1",
4528
"@react-navigation/bottom-tabs": "^5.11.2",
4629
"@react-navigation/native": "^5.8.10",
4730
"@react-navigation/stack": "^5.12.8",
48-
"react-native-video-controls": "^2.7.1",
49-
"rn-fetch-blob": "^0.12.0",
50-
"lodash": "^4.17.20",
51-
"react-native-autolink": "^3.0.0",
52-
"@cometchat-pro/react-native-calls": "1.0.7",
53-
"@cometchat-pro/react-native-chat": "2.2.0",
54-
"emoji-mart-native": "^0.6.2-beta"
31+
"react-native-video-controls": "^2.7.1"
5532
},
5633
"author": "Inscripts",
5734
"license": "ISC",
@@ -70,5 +47,14 @@
7047
"metro-react-native-babel-preset": "^0.63.0",
7148
"prettier": "^2.1.2"
7249
},
73-
"dependencies": {}
50+
"dependencies": {
51+
"@cometchat-pro/react-native-calls": "1.0.8",
52+
"@cometchat-pro/react-native-chat": "2.2.1",
53+
"@react-native-community/async-storage": "^1.12.1",
54+
"lodash": "^4.17.20",
55+
"react-native-autolink": "^3.0.0",
56+
"redux": "^4.0.5",
57+
"redux-thunk": "^2.3.0",
58+
"emoji-mart-native": "^0.6.2-beta"
59+
}
7460
}

0 commit comments

Comments
 (0)