working on share feature

This commit is contained in:
u-e 2019-01-16 20:02:30 +03:00
parent dff45476de
commit e552ae8f79
2 changed files with 14 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'react-redux';
import { withNavigation } from 'react-navigation';
import { Alert } from 'react-native';
import { Alert, Share } from 'react-native';
import ActionSheet from 'react-native-actionsheet';
import { injectIntl } from 'react-intl';
@ -52,12 +52,23 @@ class PostDropdownContainer extends PureComponent {
case '2':
this._replyNavigation();
break;
case '3':
setTimeout(() => {
this._share();
}, 500);
break;
default:
break;
}
};
_share = () => {
Share.share({
message: 'Selamun aleykim!'
}).then(alert("Aleykum Selamin"));
};
_reblog = () => {
const {
currentAccount, content, isLoggedIn, pinCode, intl,

View File

@ -1,3 +1,3 @@
export default ['COPY LINK', 'REBLOG', 'REPLY'];
export default ['COPY LINK', 'REBLOG', 'REPLY', 'SHARE'];
export const VALUE = ['copy', 'reblog', 'reply'];
export const VALUE = ['copy', 'reblog', 'reply', 'share'];