mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 20:01:56 +03:00
disabled own profile press
This commit is contained in:
parent
bd4845ace0
commit
8cd179e4bd
@ -67,6 +67,7 @@ class CommentView extends PureComponent {
|
||||
name={comment.author}
|
||||
reputation={comment.author_reputation}
|
||||
size={avatarSize || 24}
|
||||
currentAccountUsername={currentAccountUsername}
|
||||
isShowOwnerIndicator={currentAccountUsername === comment.author}
|
||||
/>
|
||||
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
|
||||
|
@ -33,8 +33,14 @@ class PostHeaderDescription extends PureComponent {
|
||||
|
||||
// Component Functions
|
||||
_handleOnUserPress = (username) => {
|
||||
const { navigation, profileOnPress, reputation } = this.props;
|
||||
const {
|
||||
navigation,
|
||||
profileOnPress,
|
||||
reputation,
|
||||
currentAccountUsername,
|
||||
} = this.props;
|
||||
|
||||
if (currentAccountUsername !== username) {
|
||||
if (profileOnPress) {
|
||||
profileOnPress(username);
|
||||
} else {
|
||||
@ -47,6 +53,7 @@ class PostHeaderDescription extends PureComponent {
|
||||
key: username,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
|
@ -73,7 +73,7 @@ class PostDisplayContainer extends Component {
|
||||
_fetchPost = async () => {
|
||||
const { post, fetchPost } = this.props;
|
||||
|
||||
fetchPost(post.author, post.permlink);
|
||||
if (post) fetchPost(post.author, post.permlink);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
@ -122,7 +122,7 @@ class PostDisplayView extends PureComponent {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { post, fetchPost, parentPost } = this.props;
|
||||
const { post, fetchPost, parentPost, currentAccount: { name } } = this.props;
|
||||
const { postHeight, scrollHeight, isLoadedComments } = this.state;
|
||||
|
||||
// const isPostEnd = scrollHeight > postHeight;
|
||||
@ -145,6 +145,7 @@ class PostDisplayView extends PureComponent {
|
||||
<PostHeaderDescription
|
||||
date={formatedTime}
|
||||
name={post.author}
|
||||
currentAccountUsername={name}
|
||||
reputation={post.author_reputation}
|
||||
tag={post.category}
|
||||
size={16}
|
||||
|
Loading…
Reference in New Issue
Block a user