Updated onShare functionality in StatusContainer
• Updated: - onShare functionality in StatusContainer
This commit is contained in:
parent
3dadf3d268
commit
f2b9889e49
@ -303,24 +303,28 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShare (targetRef, status) {
|
onShare (targetRef, status) {
|
||||||
if (!!navigator && navigator.share && navigator.canShare()) {
|
if (!!navigator && navigator.share) {
|
||||||
const url = status.get('url')
|
if (!!navigator.canShare && !navigator.canShare()) {
|
||||||
navigator.share({
|
|
||||||
url,
|
|
||||||
title: 'Check out this post on Gab',
|
|
||||||
text: 'Check out this post on Gab',
|
|
||||||
}).then(() => {
|
|
||||||
//
|
//
|
||||||
}).catch((error) => {
|
} else {
|
||||||
console.log('Error sharing', error)
|
const url = status.get('url')
|
||||||
})
|
return navigator.share({
|
||||||
} else {
|
url,
|
||||||
dispatch(openPopover(POPOVER_STATUS_SHARE, {
|
title: 'Check out this post on Gab',
|
||||||
targetRef,
|
text: 'Check out this post on Gab',
|
||||||
status,
|
}).then(() => {
|
||||||
position: 'top',
|
//
|
||||||
}))
|
}).catch((error) => {
|
||||||
}
|
console.log('Error sharing', error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch(openPopover(POPOVER_STATUS_SHARE, {
|
||||||
|
targetRef,
|
||||||
|
status,
|
||||||
|
position: 'top',
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
|
|
||||||
onCommentSortOpen(targetRef, callback) {
|
onCommentSortOpen(targetRef, callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user