Don't show warning when sharing your own post in PWI opt-out mode (#4495)
This commit is contained in:
parent
4e4a7bf18f
commit
99078bbff2
3 changed files with 15 additions and 7 deletions
|
|
@ -196,6 +196,9 @@ let PostDropdownBtn = ({
|
|||
)
|
||||
}, [postAuthor])
|
||||
|
||||
const showLoggedOutWarning =
|
||||
postAuthor.did !== currentAccount?.did && hideInPWI
|
||||
|
||||
const onSharePost = React.useCallback(() => {
|
||||
const url = toShareUrl(href)
|
||||
shareUrl(url)
|
||||
|
|
@ -296,7 +299,7 @@ let PostDropdownBtn = ({
|
|||
testID="postDropdownShareBtn"
|
||||
label={isWeb ? _(msg`Copy link to post`) : _(msg`Share`)}
|
||||
onPress={() => {
|
||||
if (hideInPWI) {
|
||||
if (showLoggedOutWarning) {
|
||||
loggedOutWarningPromptControl.open()
|
||||
} else {
|
||||
onSharePost()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue