Fixed subcomment design issue

This commit is contained in:
Mustafa Buyukcelebi 2019-11-27 21:01:02 +03:00
parent a7cf34c87a
commit e089731582
3 changed files with 5 additions and 4 deletions

View File

@ -36,6 +36,7 @@ export default EStyleSheet.create({
alignSelf: 'flex-end', alignSelf: 'flex-end',
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: -10,
}, },
voteCountText: { voteCountText: {
alignSelf: 'center', alignSelf: 'center',

View File

@ -80,6 +80,7 @@ class CommentView extends PureComponent {
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}> <View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
<PostBody <PostBody
isComment isComment
commentDepth={comment.depth}
handleOnUserPress={handleOnUserPress} handleOnUserPress={handleOnUserPress}
body={comment.body} body={comment.body}
textSelectable={false} textSelectable={false}

View File

@ -17,6 +17,7 @@ const WIDTH = Dimensions.get('window').width;
const PostBody = ({ const PostBody = ({
navigation, navigation,
body, body,
commentDepth,
isComment, isComment,
textSelectable = true, textSelectable = true,
handleOnUserPress, handleOnUserPress,
@ -208,10 +209,8 @@ const PostBody = ({
return ( return (
<Fragment> <Fragment>
<AutoHeightWebView <AutoHeightWebView
source={{ source={{ html: test }}
html: test, style={{ width: isComment ? WIDTH - (32 + 29 * commentDepth) : WIDTH - 32 }}
}}
style={{ width: isComment ? WIDTH - 61 : WIDTH - 32 }}
customStyle={customStyle} customStyle={customStyle}
onMessage={_handleOnLinkPress} onMessage={_handleOnLinkPress}
customScript={script.toString()} customScript={script.toString()}