mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-15 08:32:45 +03:00
commit
7db9049681
@ -58,9 +58,11 @@ class PostDropdownContainer extends PureComponent {
|
|||||||
case '0':
|
case '0':
|
||||||
await writeToClipboard(getPostUrl(content.url));
|
await writeToClipboard(getPostUrl(content.url));
|
||||||
this.alertTimer = setTimeout(() => {
|
this.alertTimer = setTimeout(() => {
|
||||||
Alert.alert(intl.formatMessage({
|
Alert.alert(
|
||||||
id: 'alert.copied',
|
intl.formatMessage({
|
||||||
}));
|
id: 'alert.copied',
|
||||||
|
}),
|
||||||
|
);
|
||||||
this.alertTimer = 0;
|
this.alertTimer = 0;
|
||||||
}, 300);
|
}, 300);
|
||||||
break;
|
break;
|
||||||
@ -104,12 +106,12 @@ class PostDropdownContainer extends PureComponent {
|
|||||||
const { currentAccount, content, intl } = this.props;
|
const { currentAccount, content, intl } = this.props;
|
||||||
addBookmark(currentAccount.name, content.author, content.permlink)
|
addBookmark(currentAccount.name, content.author, content.permlink)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
Alert.alert(intl.formatMessage({ id: 'bookmarks.added' }));
|
Alert.alert(intl.formatMessage({ id: 'bookmarks.added' }));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
Alert.alert(intl.formatMessage({ id: 'alert.fail' }));
|
Alert.alert(intl.formatMessage({ id: 'alert.fail' }));
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
_reblog = () => {
|
_reblog = () => {
|
||||||
const {
|
const {
|
||||||
@ -163,12 +165,17 @@ class PostDropdownContainer extends PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { intl } = this.props;
|
const { intl, currentAccount, content } = this.props;
|
||||||
|
let _OPTIONS = OPTIONS;
|
||||||
|
|
||||||
|
if (content.author === currentAccount.name) {
|
||||||
|
_OPTIONS = OPTIONS.filter(item => item !== 'reblog');
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PostDropdownView
|
<PostDropdownView
|
||||||
options={OPTIONS.map(item => intl.formatMessage({ id: `post_dropdown.${item}` }).toUpperCase())}
|
options={_OPTIONS.map(item => intl.formatMessage({ id: `post_dropdown.${item}` }).toUpperCase())}
|
||||||
handleOnDropdownSelect={this._handleOnDropdownSelect}
|
handleOnDropdownSelect={this._handleOnDropdownSelect}
|
||||||
{...this.props}
|
{...this.props}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user