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}
|
name={comment.author}
|
||||||
reputation={comment.author_reputation}
|
reputation={comment.author_reputation}
|
||||||
size={avatarSize || 24}
|
size={avatarSize || 24}
|
||||||
|
currentAccountUsername={currentAccountUsername}
|
||||||
isShowOwnerIndicator={currentAccountUsername === comment.author}
|
isShowOwnerIndicator={currentAccountUsername === comment.author}
|
||||||
/>
|
/>
|
||||||
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
|
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
|
||||||
|
@ -33,19 +33,26 @@ class PostHeaderDescription extends PureComponent {
|
|||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
_handleOnUserPress = (username) => {
|
_handleOnUserPress = (username) => {
|
||||||
const { navigation, profileOnPress, reputation } = this.props;
|
const {
|
||||||
|
navigation,
|
||||||
|
profileOnPress,
|
||||||
|
reputation,
|
||||||
|
currentAccountUsername,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
if (profileOnPress) {
|
if (currentAccountUsername !== username) {
|
||||||
profileOnPress(username);
|
if (profileOnPress) {
|
||||||
} else {
|
profileOnPress(username);
|
||||||
navigation.navigate({
|
} else {
|
||||||
routeName: ROUTES.SCREENS.PROFILE,
|
navigation.navigate({
|
||||||
params: {
|
routeName: ROUTES.SCREENS.PROFILE,
|
||||||
username,
|
params: {
|
||||||
reputation,
|
username,
|
||||||
},
|
reputation,
|
||||||
key: username,
|
},
|
||||||
});
|
key: username,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class PostDisplayContainer extends Component {
|
|||||||
_fetchPost = async () => {
|
_fetchPost = async () => {
|
||||||
const { post, fetchPost } = this.props;
|
const { post, fetchPost } = this.props;
|
||||||
|
|
||||||
fetchPost(post.author, post.permlink);
|
if (post) fetchPost(post.author, post.permlink);
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -122,7 +122,7 @@ class PostDisplayView extends PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { post, fetchPost, parentPost } = this.props;
|
const { post, fetchPost, parentPost, currentAccount: { name } } = this.props;
|
||||||
const { postHeight, scrollHeight, isLoadedComments } = this.state;
|
const { postHeight, scrollHeight, isLoadedComments } = this.state;
|
||||||
|
|
||||||
// const isPostEnd = scrollHeight > postHeight;
|
// const isPostEnd = scrollHeight > postHeight;
|
||||||
@ -145,6 +145,7 @@ class PostDisplayView extends PureComponent {
|
|||||||
<PostHeaderDescription
|
<PostHeaderDescription
|
||||||
date={formatedTime}
|
date={formatedTime}
|
||||||
name={post.author}
|
name={post.author}
|
||||||
|
currentAccountUsername={name}
|
||||||
reputation={post.author_reputation}
|
reputation={post.author_reputation}
|
||||||
tag={post.category}
|
tag={post.category}
|
||||||
size={16}
|
size={16}
|
||||||
|
@ -289,7 +289,7 @@ class PostsView extends Component {
|
|||||||
titleColor="#fff"
|
titleColor="#fff"
|
||||||
colors={['#fff']}
|
colors={['#fff']}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
ref={(ref) => {
|
ref={(ref) => {
|
||||||
this.flatList = ref;
|
this.flatList = ref;
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user