Skip to content

Commit b8b9532

Browse files
committed
fix 二维码识别回调js onClickScanImageView
1 parent 0c5a225 commit b8b9532

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

messagelist.android.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default class MessageList extends Component {
2424
this._onAvatarClick = this._onAvatarClick.bind(this);
2525
this._onStatusViewClick = this._onStatusViewClick.bind(this);
2626
this._onTouchMsgList = this._onTouchMsgList.bind(this);
27+
this._onClickScanImageView = this._onClickScanImageView.bind(this);
2728
this._onPullToRefresh = this._onPullToRefresh.bind(this);
2829
}
2930

@@ -60,6 +61,12 @@ export default class MessageList extends Component {
6061
this.props.onStatusViewClick(event.nativeEvent.message,event.nativeEvent.opt);
6162
}
6263

64+
_onClickScanImageView(event:Event){
65+
if(!this.props.onClickScanImageView){
66+
return;
67+
}
68+
this.props.onClickScanImageView(event.nativeEvent);
69+
}
6370
_onTouchMsgList() {
6471
if (!this.props.onTouchMsgList) {
6572
return;
@@ -84,6 +91,7 @@ export default class MessageList extends Component {
8491
onClickChangeAutoScroll={this._onClickChangeAutoScroll}
8592
onStatusViewClick={this._onStatusViewClick}
8693
onTouchMsgList={this._onTouchMsgList}
94+
onClickScanImageView={this._onClickScanImageView}
8795
onPullToRefresh={this._onPullToRefresh}
8896
/>
8997
);
@@ -99,6 +107,7 @@ MessageList.propTypes = {
99107
onAvatarClick: PropTypes.func,
100108
onStatusViewClick: PropTypes.func,
101109
onTouchMsgList: PropTypes.func,
110+
onClickScanImageView:PropTypes.func,
102111
onPullToRefresh: PropTypes.func,
103112

104113
sendBubble: PropTypes.object,

0 commit comments

Comments
 (0)