Added hide avatar images feature for comments

This commit is contained in:
Mustafa Buyukcelebi 2019-10-14 16:53:45 +03:00
parent 1a92916197
commit cd711b6c00
6 changed files with 13 additions and 1 deletions

View File

@ -60,6 +60,7 @@ class CommentView extends PureComponent {
voteCount,
intl,
mainAuthor = { mainAuthor },
isHideImage,
} = this.props;
const { isShowSubComments, isPressedShowButton } = this.state;
@ -74,6 +75,7 @@ class CommentView extends PureComponent {
size={avatarSize || 24}
currentAccountUsername={currentAccountUsername}
isShowOwnerIndicator={mainAuthor === comment.author}
isHideImage={isHideImage}
/>
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
<PostBody

View File

@ -235,6 +235,7 @@ class CommentsContainer extends Component {
mainAuthor,
selectedPermlink: _selectedPermlink,
isOwnProfile,
isHideImage,
} = this.props;
return (
@ -256,6 +257,7 @@ class CommentsContainer extends Component {
handleDeleteComment={this._handleDeleteComment}
handleOnPressCommentMenu={this._handleOnPressCommentMenu}
isOwnProfile={isOwnProfile}
isHideImage={isHideImage}
/>
);
}

View File

@ -56,6 +56,7 @@ class CommentsView extends Component {
handleOnVotersPress,
intl,
isOwnProfile,
isHideImage,
} = this.props;
const { selectedComment } = this.state;
@ -87,6 +88,7 @@ class CommentsView extends Component {
handleOnReplyPress={handleOnReplyPress}
handleOnUserPress={handleOnUserPress}
handleOnVotersPress={handleOnVotersPress}
isHideImage={isHideImage}
isLoggedIn={isLoggedIn}
isShowMoreButton={commentNumber === 1 && get(item, 'children') > 0}
voteCount={get(item, 'vote_count')}

View File

@ -82,6 +82,7 @@ class ProfileView extends PureComponent {
selectedUser,
username,
votingPower,
isHideImage,
} = this.props;
const {
@ -195,6 +196,7 @@ class ProfileView extends PureComponent {
comments={comments}
fetchPost={getReplies}
isOwnProfile={isOwnProfile}
isHideImage={isHideImage}
/>
</ScrollView>
) : (

View File

@ -331,7 +331,7 @@ class ProfileContainer extends Component {
user,
username,
} = this.state;
const { currency, isDarkTheme, isLoggedIn, navigation, children } = this.props;
const { currency, isDarkTheme, isLoggedIn, navigation, children, isHideImage } = this.props;
const activePage = get(navigation.state.params, 'state', 0);
const { currencyRate, currencySymbol } = currency;
@ -370,6 +370,7 @@ class ProfileContainer extends Component {
isDarkTheme,
isFavorite,
isFollowing,
isHideImage,
isLoggedIn,
isMuted,
isOwnProfile,
@ -390,6 +391,7 @@ const mapStateToProps = state => ({
pinCode: state.application.pin,
activeBottomTab: state.ui.activeBottomTab,
currentAccount: state.account.currentAccount,
isHideImage: state.ui.hidePostsThumbnails,
});
export default connect(mapStateToProps)(withNavigation(ProfileContainer));

View File

@ -27,6 +27,7 @@ const ProfileScreen = () => (
isDarkTheme,
isFavorite,
isFollowing,
isHideImage,
isLoggedIn,
isMuted,
isOwnProfile,
@ -72,6 +73,7 @@ const ProfileScreen = () => (
setEstimatedWalletValue={setEstimatedWalletValue}
username={username}
votingPower={votingPower}
isHideImage={isHideImage}
/>
)}
</ProfileContainer>