Skip to content

Commit 5f496ab

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 5e7cf70 + 087d274 commit 5f496ab

File tree

7 files changed

+80
-24
lines changed

7 files changed

+80
-24
lines changed

README.md

Lines changed: 69 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
```
99
npm install react-native-imui --save
10+
```
11+
## link
12+
13+
```
14+
react-naive link react-native-imui
1015
```
1116
`settings.gradle` 中的引用路径:
1217
```
@@ -67,8 +72,8 @@ dependencies {
6772
**status 必须为以下四个值之一: "send_succeed", "send_failed", "send_going", "download_failed",如果没有定义这个属性, 默认值是 "send_succeed".**
6873

6974
```
70-
message = { // text message
71-
msgId: "msgid",
75+
 message = { // 文本
76+
   msgId: "msgid",
7277
status: "send_going",
7378
msgType: "text",
7479
isOutgoing: true,
@@ -82,34 +87,82 @@ message = { // image message
8287
isOutGoing: true,
8388
progress: "progress string"
8489
mediaPath: "image path"
85-
fromUser: {}
90+
fromUser: {},
91+
extend:{
92+
displayName:"图片发送于2017-12-07 10:07",
93+
imageHeight:"2848.000000",
94+
imageWidth:"4288.000000",
95+
thumbPath:"",
96+
url:""
97+
}
8698
}
8799
88-
89-
message = { // voice message
90-
msgId: "msgid",
100+
message = { // 语音
101+
   msgId: "msgid",
91102
msgType: "voice",
92103
isOutGoing: true,
93104
duration: number, // 注意这个值有用户自己设置时长,单位秒
94105
mediaPath: "voice path"
106+
fromUser: {},
107+
extend:{
108+
duration:"3"
109+
isPlayed:false
110+
url:""
111+
}
112+
}
113+
114+
message = { //红包消息
115+
   msgId: "msgid",
116+
status: "",
117+
msgType: "redpacket",
118+
isOutGoing: true,
119+
   extend: {
120+
comments:"",//祝福语
121+
serialNo:"",//
122+
     type:""//红包类型
123+
   },
124+
fromUser: {}
125+
}
126+
message = { //红包领取消息
127+
   msgId: "msgid",
128+
status: "",
129+
msgType: "redpacketOpen",
130+
isOutGoing: true,
131+
   extend: {
132+
serialNo:""
133+
    tipMsg:""//红包通知
134+
   },
95135
fromUser: {}
96136
}
97137
98-
message = { // video message
99-
msgId: "msgid",
100-
status: "send_failed",
101-
msgType: "video",
138+
message = { //转账消息
139+
   msgId: "msgid",
140+
status: "",
141+
msgType: "transfer",
102142
isOutGoing: true,
103-
druation: number
104-
mediaPath: "voice path"
143+
   extend: {
144+
amount:"1"
145+
comments:""
146+
serialNo:""
147+
   },
105148
fromUser: {}
106149
}
107150
108-
message = { // event message
109-
msgId: "msgid",
110-
msgType: "event",
111-
text: "the event text"
151+
message = { //名片消息
152+
   msgId: "msgid",
153+
status: "",
154+
msgType: "card",
155+
isOutGoing: true,
156+
   extend: {
157+
    imgPath:""//头像
158+
    name:""//昵称
159+
    sessionId:""//userId
160+
type:""
161+
   },
162+
fromUser: {}
112163
}
164+
165+
113166
```
114167

115168
- `fromUser` 对象格式:

chatinput.android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var {
1010
StyleSheet,
1111
View,
1212
requireNativeComponent,
13+
ViewPropTypes
1314
} = ReactNative;
1415
import PropTypes from 'prop-types'
1516

@@ -89,7 +90,7 @@ ChatInput.propTypes = {
8990
onShowKeyboard: PropTypes.func,
9091
onFeatureView: PropTypes.func,
9192
onEditTextChange: PropTypes.func,
92-
...View.propTypes
93+
...ViewPropTypes
9394
};
9495

9596
var RCTChatInput = requireNativeComponent('RCTChatInput', ChatInput);

chatinput.ios.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {View, requireNativeComponent,NativeModules} from 'react-native';
2+
import {View, requireNativeComponent,NativeModules,ViewPropTypes} from 'react-native';
33
import PropTypes from 'prop-types'
44

55
export default class ChatInput extends Component {
@@ -64,7 +64,7 @@ export default class ChatInput extends Component {
6464
}
6565
}
6666
ChatInput.propTypes = {
67-
...View.propTypes,
67+
...ViewPropTypes,
6868
// menuViewH:PropTypes.number,
6969
defaultToolHeight:PropTypes.number,
7070
onFeatureView:PropTypes.func,

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIBaseMessageCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ open class IMUIBaseMessageCell: UICollectionViewCell, IMUIMessageCellProtocal,Me
238238
}
239239

240240
func tapCellView(){//点击整个cell,隐藏键盘
241-
// self.delegate?.messageCollectionView?(tapCellView: "")
242-
UIApplication.shared.keyWindow?.endEditing(true)
241+
self.delegate?.messageCollectionView?(tapCellView: "")
242+
// UIApplication.shared.keyWindow?.endEditing(true)
243243
}
244244

245245

messagelist.android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var {
1111
StyleSheet,
1212
View,
1313
requireNativeComponent,
14+
ViewPropTypes
1415
} = ReactNative;
1516
import PropTypes from 'prop-types'
1617

@@ -123,7 +124,7 @@ MessageList.propTypes = {
123124
datePadding: PropTypes.number,
124125
avatarSize: PropTypes.object,
125126
isShowDisplayName: PropTypes.bool,
126-
...View.propTypes
127+
...ViewPropTypes
127128
};
128129

129130
var RCTMessageList = requireNativeComponent('RCTMessageList', MessageList);

messagelist.ios.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var {
1111
StyleSheet,
1212
View,
1313
requireNativeComponent,
14+
ViewPropTypes
1415
} = ReactNative;
1516
import PropTypes from 'prop-types'
1617

@@ -151,7 +152,7 @@ MessageList.propTypes = {
151152
isShowDisplayName: PropTypes.bool,
152153
isShowIncommingDisplayName: PropTypes.bool,
153154
isShowOutgoingDisplayName: PropTypes.bool,
154-
...View.propTypes
155+
...ViewPropTypes
155156
};
156157

157158
var RCTMessageList = requireNativeComponent('RCTMessageListView', MessageList);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@
8181
"scripts": {
8282
"test": "echo \"Error: no test specified\" && exit 1"
8383
},
84-
"version": "1.0.3"
84+
"version": "1.0.6"
8585
}

0 commit comments

Comments
 (0)