...
|
...
|
@@ -249,6 +249,7 @@ export default class SubjectPost extends Component { |
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
autoFocus={true}
|
|
|
maxLength={1000}
|
|
|
onChangeText={
|
|
|
(text)=>{
|
|
|
this.replyContent = text;
|
...
|
...
|
@@ -259,6 +260,11 @@ export default class SubjectPost extends Component { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
onKeyPress={(event)=>{
|
|
|
if (this.replyContent >= 1000) {
|
|
|
NativeModules.YH_CommunityHelper.showText('超出1000字符最长限制');
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
<Text style={[styles.submitText, {color:this.state.replyTextColor}]} onPress={this.commitComment}>发送</Text>
|
|
|
</View>
|
...
|
...
|
@@ -288,6 +294,7 @@ export default class SubjectPost extends Component { |
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
autoFocus={true}
|
|
|
maxLength={1000}
|
|
|
onChangeText={
|
|
|
(text)=>{
|
|
|
this.replyContent = text;
|
...
|
...
|
@@ -298,6 +305,11 @@ export default class SubjectPost extends Component { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
onKeyPress={(event)=>{
|
|
|
if (this.replyContent >= 1000) {
|
|
|
NativeModules.YH_CommunityHelper.showText('超出1000字符最长限制');
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
<Text style={[styles.submitText, {color:this.state.replyTextColor}]} onPress={this.commitComment}>发送</Text>
|
|
|
</View>
|
...
|
...
|
@@ -313,7 +325,7 @@ export default class SubjectPost extends Component { |
|
|
}
|
|
|
|
|
|
commitComment() {
|
|
|
if (this.replyContent.length == 0) {
|
|
|
if (this.replyContent.length == 0 && !this.props.assets.length) {
|
|
|
Alert.alert('抱歉','请先输入内容');
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -356,6 +368,7 @@ export default class SubjectPost extends Component { |
|
|
replyTo,
|
|
|
}
|
|
|
this.props.commentWithParams(params, fakeComment);
|
|
|
this.replyContent = '';
|
|
|
this.blurAll();
|
|
|
}
|
|
|
renderRow(rowData, sectionId) {
|
...
|
...
|
|