diff options
-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} |