mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-12 13:05:41 +03:00
comment design updated
This commit is contained in:
parent
7fc536cf90
commit
8db3cb2674
@ -12,6 +12,7 @@ export default EStyleSheet.create({
|
||||
height: 18,
|
||||
flexDirection: 'row-reverse',
|
||||
borderRadius: 20,
|
||||
minWidth: 40,
|
||||
},
|
||||
moreText: {
|
||||
color: '$white',
|
||||
|
@ -24,6 +24,7 @@ class CommentView extends PureComponent {
|
||||
super(props);
|
||||
this.state = {
|
||||
isShowSubComments: props.isShowSubComments || false,
|
||||
isPressedShowButton: false,
|
||||
};
|
||||
}
|
||||
|
||||
@ -33,7 +34,7 @@ class CommentView extends PureComponent {
|
||||
_showSubCommentsToggle = () => {
|
||||
const { isShowSubComments } = this.state;
|
||||
|
||||
this.setState({ isShowSubComments: !isShowSubComments });
|
||||
this.setState({ isShowSubComments: !isShowSubComments, isPressedShowButton: true });
|
||||
};
|
||||
|
||||
render() {
|
||||
@ -51,7 +52,7 @@ class CommentView extends PureComponent {
|
||||
fetchPost,
|
||||
isShowComments,
|
||||
} = this.props;
|
||||
const { isShowSubComments } = this.state;
|
||||
const { isShowSubComments, isPressedShowButton } = this.state;
|
||||
|
||||
return (
|
||||
<View>
|
||||
@ -93,13 +94,13 @@ class CommentView extends PureComponent {
|
||||
<TextWithIcon
|
||||
wrapperStyle={styles.rightButton}
|
||||
iconName={isShowSubComments ? 'keyboard-arrow-up' : 'keyboard-arrow-down'}
|
||||
textStyle={styles.moreText}
|
||||
textStyle={!isPressedShowButton && styles.moreText}
|
||||
iconType="MaterialIcons"
|
||||
isClickable
|
||||
iconStyle={styles.iconStyle}
|
||||
iconSize={16}
|
||||
onPress={() => this._showSubCommentsToggle()}
|
||||
text={`${comment.children} more replies`}
|
||||
text={!isPressedShowButton ? `${comment.children} more replies` : ''}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user