mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 18:09:31 +08:00
Merge branch 'master' of github.com:timepill/timepill-app into firebase
This commit is contained in:
commit
84c9144140
4 changed files with 29 additions and 20 deletions
|
@ -52,12 +52,12 @@ export default class CommentInput extends Component {
|
||||||
content: content,
|
content: content,
|
||||||
replyUserId: comment.user.id,
|
replyUserId: comment.user.id,
|
||||||
replyUserName: comment.user.name
|
replyUserName: comment.user.name
|
||||||
});
|
}, () => {
|
||||||
|
|
||||||
if(this.refs.commentInput) {
|
if(this.refs.commentInput) {
|
||||||
// this.refs.commentInput.focus();
|
this.refs.commentInput.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount(){
|
componentWillUnmount(){
|
||||||
|
@ -125,9 +125,16 @@ export default class CommentInput extends Component {
|
||||||
underlineColorAndroid="transparent"
|
underlineColorAndroid="transparent"
|
||||||
|
|
||||||
onChangeText={(text) => {
|
onChangeText={(text) => {
|
||||||
this.setState({
|
let state = {
|
||||||
content: text
|
content: text
|
||||||
})
|
}
|
||||||
|
|
||||||
|
if(!text || !text.startsWith('@'+this.state.replyUserName)) {
|
||||||
|
state.replyUserId = 0;
|
||||||
|
state.replyUserName = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState(state);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TouchableOpacity style={localStyle.buttonWrap}
|
<TouchableOpacity style={localStyle.buttonWrap}
|
||||||
|
@ -145,12 +152,6 @@ export default class CommentInput extends Component {
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{
|
|
||||||
!Api.IS_ANDROID
|
|
||||||
? <KeyboardSpacer topSpacing={Api.IS_IPHONEX ? -30 : 0} />
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -158,7 +159,7 @@ export default class CommentInput extends Component {
|
||||||
|
|
||||||
const localStyle = StyleSheet.create({
|
const localStyle = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
height: 56,
|
height: Api.IS_IPHONEX ? 66 : 56,
|
||||||
backgroundColor: '#eee',
|
backgroundColor: '#eee',
|
||||||
elevation: 3,
|
elevation: 3,
|
||||||
borderColor: '#bbb',
|
borderColor: '#bbb',
|
||||||
|
@ -182,7 +183,7 @@ const localStyle = StyleSheet.create({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
paddingBottom: 12,
|
paddingBottom: Api.IS_IPHONEX ? 22 : 12,
|
||||||
paddingRight:12,
|
paddingRight:12,
|
||||||
paddingTop: 12
|
paddingTop: 12
|
||||||
},
|
},
|
||||||
|
|
|
@ -80,12 +80,12 @@ export default class DiaryIconOkB extends Component {
|
||||||
style={localStyle.icon}
|
style={localStyle.icon}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Text style={[localStyle.icon, {
|
<Text style={[localStyle.text, {
|
||||||
color: !this.state.active
|
color: !this.state.active
|
||||||
? Color.inactiveText
|
? Color.inactiveText
|
||||||
: Color.primary
|
: Color.primary
|
||||||
}]}
|
}]}
|
||||||
>{this.state.count}</Text>
|
>{this.state.count > 0 ? this.state.count : ''}</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
@ -94,7 +94,9 @@ export default class DiaryIconOkB extends Component {
|
||||||
|
|
||||||
const localStyle = StyleSheet.create({
|
const localStyle = StyleSheet.create({
|
||||||
wrap: {
|
wrap: {
|
||||||
flexDirection: 'row'
|
flexDirection: 'row',
|
||||||
|
marginRight: 10,
|
||||||
|
marginTop: -1
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
width: 18,
|
width: 18,
|
||||||
|
@ -103,6 +105,7 @@ const localStyle = StyleSheet.create({
|
||||||
marginRight: 1
|
marginRight: 1
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontSize: 15
|
fontSize: 15,
|
||||||
|
marginLeft: 4
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
|
@ -361,10 +361,15 @@ export default class WritePage extends Component {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let topicTitle = this.topic.title;
|
||||||
|
if(topicTitle && topicTitle.length > 6) {
|
||||||
|
topicTitle = topicTitle.substring(0, 6) + '..';
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity>
|
<TouchableOpacity>
|
||||||
<Text style={{color: Color.light, fontSize: 15, paddingRight: 15}}>
|
<Text style={{color: Color.light, fontSize: 15, paddingRight: 15}}>
|
||||||
# {this.topic.title}
|
# {topicTitle}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue