mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 11:51:52 +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,19 +33,26 @@ class PostHeaderDescription extends PureComponent {
|
||||
|
||||
// Component Functions
|
||||
_handleOnUserPress = (username) => {
|
||||
const { navigation, profileOnPress, reputation } = this.props;
|
||||
const {
|
||||
navigation,
|
||||
profileOnPress,
|
||||
reputation,
|
||||
currentAccountUsername,
|
||||
} = this.props;
|
||||
|
||||
if (profileOnPress) {
|
||||
profileOnPress(username);
|
||||
} else {
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.PROFILE,
|
||||
params: {
|
||||
username,
|
||||
reputation,
|
||||
},
|
||||
key: username,
|
||||
});
|
||||
if (currentAccountUsername !== username) {
|
||||
if (profileOnPress) {
|
||||
profileOnPress(username);
|
||||
} else {
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.PROFILE,
|
||||
params: {
|
||||
username,
|
||||
reputation,
|
||||
},
|
||||
key: username,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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}
|
||||
|
@ -289,7 +289,7 @@ class PostsView extends Component {
|
||||
titleColor="#fff"
|
||||
colors={['#fff']}
|
||||
/>
|
||||
)}
|
||||
)}
|
||||
ref={(ref) => {
|
||||
this.flatList = ref;
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user