diff options
author | Hailey <me@haileyok.com> | 2024-06-12 08:51:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 08:51:08 -0700 |
commit | 99078bbff2282ad18594a4d5a4ed5fe207c394e4 (patch) | |
tree | ff9cc55aa71de3192c333e3dede03fcf5bd44e32 /src/view/com/util/forms/PostDropdownBtn.tsx | |
parent | 4e4a7bf18f04964e545a02a2fe94ce8a9cbe8ac2 (diff) | |
download | voidsky-99078bbff2282ad18594a4d5a4ed5fe207c394e4.tar.zst |
Don't show warning when sharing your own post in PWI opt-out mode (#4495)
Diffstat (limited to 'src/view/com/util/forms/PostDropdownBtn.tsx')
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index b6873ff8a..2486b73d5 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -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() |