added post title inplace of summary when replying comment

This commit is contained in:
Sadaqat Ali 2022-04-18 20:09:39 +05:00
parent b6f405c701
commit c1d027689f
3 changed files with 25 additions and 7 deletions

View File

@ -208,7 +208,8 @@ const PostDisplayView = ({
// show quick reply modal
const _showQuickReplyModal = (post) => {
// console.log('post in _showQuickReplyModal : ', post);
console.log('post in _showQuickReplyModal : ', post);
console.log('parentPost : ', parentPost);
if (isLoggedIn) {
quickReplyModalRef.current.show(post);
} else {

View File

@ -86,5 +86,14 @@ export default EStyleSheet.create({
marginLeft: 4,
color: '$primaryDarkGray',
},
titleContainer: {
paddingHorizontal: 16,
paddingVertical: 8,
backgroundColor: '$primaryBackgroundColor',
},
titleText: {
color: '$primaryBlack',
fontWeight: 'bold',
fontSize: 10,
},
});

View File

@ -183,11 +183,19 @@ const QuickReplyModal = ({}: QuickReplyModalProps, ref) => {
);
const _renderSummary = () => (
<TouchableOpacity onPress={() => _handleOnSummaryPress()}>
<SummaryArea style={styles.summaryStyle} summary={selectedPost.summary} />
</TouchableOpacity>
);
const _renderSummary = () => {
return selectedPost.summary ? (
<TouchableOpacity onPress={() => _handleOnSummaryPress()}>
<SummaryArea style={styles.summaryStyle} summary={selectedPost.summary} />
</TouchableOpacity>
) : (
<View style={styles.titleContainer}>
<Text style={styles.titleText}>
{selectedPost.title}
</Text>
</View>
);
};
const _renderAvatar = () => (
<View style={styles.avatarAndNameContainer}>
<UserAvatar noAction username={currentAccount.username} />