diff options
author | Ashm Walia <ashmwalia@outlook.com> | 2021-01-29 12:09:54 -0800 |
---|---|---|
committer | Ashm Walia <ashmwalia@outlook.com> | 2021-01-29 12:09:54 -0800 |
commit | 830297c6f7ce554946246540a7239ab5b3ed712a (patch) | |
tree | 828757c00f35bfd95cff02a73987a40eb78b5906 /src/components/comments/CommentTile.tsx | |
parent | b34ae3fa04934616934bd50e9a472e19036ec2fa (diff) |
Fix
Diffstat (limited to 'src/components/comments/CommentTile.tsx')
-rw-r--r-- | src/components/comments/CommentTile.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/comments/CommentTile.tsx b/src/components/comments/CommentTile.tsx index 347954b5..a1ee582b 100644 --- a/src/components/comments/CommentTile.tsx +++ b/src/components/comments/CommentTile.tsx @@ -18,6 +18,7 @@ import CommentsContainer from './CommentsContainer'; import Swipeable from 'react-native-gesture-handler/Swipeable'; import {deleteComment} from '../../services'; import {ERROR_FAILED_TO_DELETE_COMMENT} from '../../constants/strings'; +import {min} from 'moment'; /** * Displays users's profile picture, comment posted by them and the time difference between now and when a comment was posted. @@ -161,7 +162,13 @@ const CommentTile: React.FC<CommentTileProps> = ({ {/*** Show replies if toggle state is true */} {showReplies && comment_object.replies_count > 0 && ( - <View style={{height: SCREEN_HEIGHT / 2.4}}> + <View + style={{ + height: Math.min( + SCREEN_HEIGHT / 2.4, + (SCREEN_HEIGHT / 8) * comment_object.replies_count, + ), + }}> <CommentsContainer objectId={comment_object.comment_id} screenType={screenType} |