Merge branch 'master' of github.com:timepill/timepill-app into firebase

This commit is contained in:
mx1700 2019-07-28 17:21:30 +08:00
commit 84c9144140
4 changed files with 29 additions and 20 deletions

View file

@ -52,12 +52,12 @@ export default class CommentInput extends Component {
content: content,
replyUserId: comment.user.id,
replyUserName: comment.user.name
});
}, () => {
if(this.refs.commentInput) {
// this.refs.commentInput.focus();
this.refs.commentInput.focus();
}
});
});
}
componentWillUnmount(){
@ -125,9 +125,16 @@ export default class CommentInput extends Component {
underlineColorAndroid="transparent"
onChangeText={(text) => {
this.setState({
let state = {
content: text
})
}
if(!text || !text.startsWith('@'+this.state.replyUserName)) {
state.replyUserId = 0;
state.replyUserName = '';
}
this.setState(state);
}}
/>
<TouchableOpacity style={localStyle.buttonWrap}
@ -145,12 +152,6 @@ export default class CommentInput extends Component {
</View>
) : null}
{
!Api.IS_ANDROID
? <KeyboardSpacer topSpacing={Api.IS_IPHONEX ? -30 : 0} />
: null
}
</View>
);
}
@ -158,7 +159,7 @@ export default class CommentInput extends Component {
const localStyle = StyleSheet.create({
container: {
height: 56,
height: Api.IS_IPHONEX ? 66 : 56,
backgroundColor: '#eee',
elevation: 3,
borderColor: '#bbb',
@ -182,7 +183,7 @@ const localStyle = StyleSheet.create({
position: 'absolute',
bottom: 0,
right: 0,
paddingBottom: 12,
paddingBottom: Api.IS_IPHONEX ? 22 : 12,
paddingRight:12,
paddingTop: 12
},

View file

@ -80,12 +80,12 @@ export default class DiaryIconOkB extends Component {
style={localStyle.icon}
/>
<Text style={[localStyle.icon, {
<Text style={[localStyle.text, {
color: !this.state.active
? Color.inactiveText
: Color.primary
}]}
>{this.state.count}</Text>
>{this.state.count > 0 ? this.state.count : ''}</Text>
</View>
</TouchableOpacity>
);
@ -94,7 +94,9 @@ export default class DiaryIconOkB extends Component {
const localStyle = StyleSheet.create({
wrap: {
flexDirection: 'row'
flexDirection: 'row',
marginRight: 10,
marginTop: -1
},
icon: {
width: 18,
@ -103,6 +105,7 @@ const localStyle = StyleSheet.create({
marginRight: 1
},
text: {
fontSize: 15
fontSize: 15,
marginLeft: 4
}
});

View file

@ -228,7 +228,7 @@ export default class DiaryDetailPage extends Component {
}
{
Api.IS_IOS ? <KeyboardSpacer topSpacing={Api.IS_IPHONEX ? -30 : 0} /> : null
Api.IS_IOS ? <KeyboardSpacer topSpacing={Api.IS_IPHONEX ? -10 : 0} /> : null
}
</View>
);

View file

@ -361,10 +361,15 @@ export default class WritePage extends Component {
return null;
}
let topicTitle = this.topic.title;
if(topicTitle && topicTitle.length > 6) {
topicTitle = topicTitle.substring(0, 6) + '..';
}
return (
<TouchableOpacity>
<Text style={{color: Color.light, fontSize: 15, paddingRight: 15}}>
# {this.topic.title}
# {topicTitle}
</Text>
</TouchableOpacity>
)