Don't show warning when sharing your own post in PWI opt-out mode (#4495)

This commit is contained in:
Hailey 2024-06-12 08:51:08 -07:00 committed by GitHub
parent 4e4a7bf18f
commit 99078bbff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 7 deletions

View file

@ -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()