diff options
author | Eric Bailey <git@esb.lol> | 2023-11-22 16:53:11 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 16:53:11 -0600 |
commit | 95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b (patch) | |
tree | c25793eac2ee221ce6b431201c0d4362384c7297 /src/view/com/util/forms/PostDropdownBtn.tsx | |
parent | 08333002cc4589c225c8fb82112d7059c334bfeb (diff) | |
download | voidsky-95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b.tar.zst |
[PWI] Misc (#1977)
* PostDropdownBtn * Hide reply prompt * Hide FABs
Diffstat (limited to 'src/view/com/util/forms/PostDropdownBtn.tsx')
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 889839d07..636817f72 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -35,7 +35,7 @@ export function PostDropdownBtn({ record: AppBskyFeedPost.Record style?: StyleProp<ViewStyle> }) { - const {currentAccount} = useSession() + const {hasSession, currentAccount} = useSession() const theme = useTheme() const {_} = useLingui() const defaultCtrlColor = theme.palette.default.postCtrl @@ -136,10 +136,10 @@ export function PostDropdownBtn({ web: 'share', }, }, - { + hasSession && { label: 'separator', }, - { + hasSession && { label: isThreadMuted ? _(msg`Unmute thread`) : _(msg`Mute thread`), onPress() { onToggleThreadMute() @@ -153,27 +153,28 @@ export function PostDropdownBtn({ web: 'comment-slash', }, }, - { + hasSession && { label: 'separator', }, - !isAuthor && { - label: _(msg`Report post`), - onPress() { - openModal({ - name: 'report', - uri: post.uri, - cid: post.cid, - }) - }, - testID: 'postDropdownReportBtn', - icon: { - ios: { - name: 'exclamationmark.triangle', + !isAuthor && + hasSession && { + label: _(msg`Report post`), + onPress() { + openModal({ + name: 'report', + uri: post.uri, + cid: post.cid, + }) + }, + testID: 'postDropdownReportBtn', + icon: { + ios: { + name: 'exclamationmark.triangle', + }, + android: 'ic_menu_report_image', + web: 'circle-exclamation', }, - android: 'ic_menu_report_image', - web: 'circle-exclamation', }, - }, isAuthor && { label: 'separator', }, |