mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 12:21:31 +03:00
Merge pull request #1135 from esteemapp/bugfix/comment-open-thread
Fixed auto comment opening
This commit is contained in:
commit
4c165856d9
@ -198,33 +198,26 @@ class CommentsContainer extends Component {
|
||||
_handleOnPressCommentMenu = (index, selectedComment) => {
|
||||
const { dispatch, intl, navigation, isOwnProfile } = this.props;
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
writeToClipboard(`https://steemit.com${get(selectedComment, 'url')}`).then(() => {
|
||||
dispatch(
|
||||
toastNotification(
|
||||
intl.formatMessage({
|
||||
id: 'alert.copied',
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
case isOwnProfile:
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.POST,
|
||||
key: get(selectedComment, 'permlink'),
|
||||
params: {
|
||||
author: get(selectedComment, 'author'),
|
||||
permlink: get(selectedComment, 'permlink'),
|
||||
isHasParentPost: get(selectedComment, 'parent_permlink'),
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
if (index === 0) {
|
||||
writeToClipboard(`https://steemit.com${get(selectedComment, 'url')}`).then(() => {
|
||||
dispatch(
|
||||
toastNotification(
|
||||
intl.formatMessage({
|
||||
id: 'alert.copied',
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
} else if (index === 1 && isOwnProfile) {
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.POST,
|
||||
key: get(selectedComment, 'permlink'),
|
||||
params: {
|
||||
author: get(selectedComment, 'author'),
|
||||
permlink: get(selectedComment, 'permlink'),
|
||||
isHasParentPost: get(selectedComment, 'parent_permlink'),
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user