From cd7f438f1aa76096d350f5595656ce84d2275b5d Mon Sep 17 00:00:00 2001 From: Hailey Date: Sun, 23 Jun 2024 02:35:34 -0700 Subject: [PATCH] disable native dropdowns for now, remove ios-context-menu --- package.json | 3 +- src/components/TagMenu/index.web.tsx | 217 +++++------ src/view/com/posts/AviFollowButton.tsx | 104 +++-- src/view/com/util/AccountDropdownBtn.tsx | 77 ++-- src/view/screens/ProfileList.tsx | 476 +++++++++++------------ yarn.lock | 30 +- 6 files changed, 434 insertions(+), 473 deletions(-) diff --git a/package.json b/package.json index 44326620ad..c5a1b7dd82 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,6 @@ "react-native-gesture-handler": "~2.16.2", "react-native-get-random-values": "~1.11.0", "react-native-image-crop-picker": "0.40.3", - "react-native-ios-context-menu": "^1.15.3", "react-native-keyboard-controller": "^1.12.1", "react-native-pager-view": "6.2.3", "react-native-picker-select": "^9.1.3", @@ -196,7 +195,7 @@ "statsig-react-native-expo": "^4.6.1", "tippy.js": "^6.3.7", "tlds": "^1.234.0", - "zeego": "^1.6.2", + "zeego": "^1.10.0", "zod": "^3.20.2" }, "devDependencies": { diff --git a/src/components/TagMenu/index.web.tsx b/src/components/TagMenu/index.web.tsx index 4336223861..c9e425197b 100644 --- a/src/components/TagMenu/index.web.tsx +++ b/src/components/TagMenu/index.web.tsx @@ -1,21 +1,10 @@ import React from 'react' -import {msg} from '@lingui/macro' -import {useLingui} from '@lingui/react' -import {useNavigation} from '@react-navigation/native' -import {isInvalidHandle} from '#/lib/strings/handles' import {EventStopper} from '#/view/com/util/EventStopper' -import {NativeDropdown} from '#/view/com/util/forms/NativeDropdown' -import {NavigationProp} from '#/lib/routes/types' -import { - usePreferencesQuery, - useUpsertMutedWordsMutation, - useRemoveMutedWordMutation, -} from '#/state/queries/preferences' -import {enforceLen} from '#/lib/strings/helpers' -import {web} from '#/alf' import * as Dialog from '#/components/Dialog' +// @TODO Fabric + export function useTagMenuControl(): Dialog.DialogControlProps { return { id: '', @@ -30,11 +19,7 @@ export function useTagMenuControl(): Dialog.DialogControlProps { } } -export function TagMenu({ - children, - tag, - authorHandle, -}: React.PropsWithChildren<{ +export function TagMenu({}: React.PropsWithChildren<{ /** * This should be the sanitized tag value from the facet itself, not the * "display" value with a leading `#`. @@ -42,108 +27,108 @@ export function TagMenu({ tag: string authorHandle?: string }>) { - const {_} = useLingui() - const navigation = useNavigation() - const {data: preferences} = usePreferencesQuery() - const {mutateAsync: upsertMutedWord, variables: optimisticUpsert} = - useUpsertMutedWordsMutation() - const {mutateAsync: removeMutedWord, variables: optimisticRemove} = - useRemoveMutedWordMutation() - const isMuted = Boolean( - (preferences?.moderationPrefs.mutedWords?.find( - m => m.value === tag && m.targets.includes('tag'), - ) ?? - optimisticUpsert?.find( - m => m.value === tag && m.targets.includes('tag'), - )) && - !(optimisticRemove?.value === tag), - ) - const truncatedTag = '#' + enforceLen(tag, 15, true, 'middle') + // const {_} = useLingui() + // const navigation = useNavigation() + // const {data: preferences} = usePreferencesQuery() + // const {mutateAsync: upsertMutedWord, variables: optimisticUpsert} = + // useUpsertMutedWordsMutation() + // const {mutateAsync: removeMutedWord, variables: optimisticRemove} = + // useRemoveMutedWordMutation() + // const isMuted = Boolean( + // (preferences?.moderationPrefs.mutedWords?.find( + // m => m.value === tag && m.targets.includes('tag'), + // ) ?? + // optimisticUpsert?.find( + // m => m.value === tag && m.targets.includes('tag'), + // )) && + // !(optimisticRemove?.value === tag), + // ) + // const truncatedTag = '#' + enforceLen(tag, 15, true, 'middle') - const dropdownItems = React.useMemo(() => { - return [ - { - label: _(msg`See ${truncatedTag} posts`), - onPress() { - navigation.push('Hashtag', { - tag: encodeURIComponent(tag), - }) - }, - testID: 'tagMenuSearch', - icon: { - ios: { - name: 'magnifyingglass', - }, - android: '', - web: 'magnifying-glass', - }, - }, - authorHandle && - !isInvalidHandle(authorHandle) && { - label: _(msg`See ${truncatedTag} posts by user`), - onPress() { - navigation.push('Hashtag', { - tag: encodeURIComponent(tag), - author: authorHandle, - }) - }, - testID: 'tagMenuSearchByUser', - icon: { - ios: { - name: 'magnifyingglass', - }, - android: '', - web: ['far', 'user'], - }, - }, - preferences && { - label: 'separator', - }, - preferences && { - label: isMuted - ? _(msg`Unmute ${truncatedTag}`) - : _(msg`Mute ${truncatedTag}`), - onPress() { - if (isMuted) { - removeMutedWord({value: tag, targets: ['tag']}) - } else { - upsertMutedWord([{value: tag, targets: ['tag']}]) - } - }, - testID: 'tagMenuMute', - icon: { - ios: { - name: 'speaker.slash', - }, - android: 'ic_menu_sort_alphabetically', - web: isMuted ? 'eye' : ['far', 'eye-slash'], - }, - }, - ].filter(Boolean) - }, [ - _, - authorHandle, - isMuted, - navigation, - preferences, - tag, - truncatedTag, - upsertMutedWord, - removeMutedWord, - ]) + // const dropdownItems = React.useMemo(() => { + // return [ + // { + // label: _(msg`See ${truncatedTag} posts`), + // onPress() { + // navigation.push('Hashtag', { + // tag: encodeURIComponent(tag), + // }) + // }, + // testID: 'tagMenuSearch', + // icon: { + // ios: { + // name: 'magnifyingglass', + // }, + // android: '', + // web: 'magnifying-glass', + // }, + // }, + // authorHandle && + // !isInvalidHandle(authorHandle) && { + // label: _(msg`See ${truncatedTag} posts by user`), + // onPress() { + // navigation.push('Hashtag', { + // tag: encodeURIComponent(tag), + // author: authorHandle, + // }) + // }, + // testID: 'tagMenuSearchByUser', + // icon: { + // ios: { + // name: 'magnifyingglass', + // }, + // android: '', + // web: ['far', 'user'], + // }, + // }, + // preferences && { + // label: 'separator', + // }, + // preferences && { + // label: isMuted + // ? _(msg`Unmute ${truncatedTag}`) + // : _(msg`Mute ${truncatedTag}`), + // onPress() { + // if (isMuted) { + // removeMutedWord({value: tag, targets: ['tag']}) + // } else { + // upsertMutedWord([{value: tag, targets: ['tag']}]) + // } + // }, + // testID: 'tagMenuMute', + // icon: { + // ios: { + // name: 'speaker.slash', + // }, + // android: 'ic_menu_sort_alphabetically', + // web: isMuted ? 'eye' : ['far', 'eye-slash'], + // }, + // }, + // ].filter(Boolean) + // }, [ + // _, + // authorHandle, + // isMuted, + // navigation, + // preferences, + // tag, + // truncatedTag, + // upsertMutedWord, + // removeMutedWord, + // ]) return ( - - {children} - + {/**/} + {/* {children}*/} + {/**/} ) } diff --git a/src/view/com/posts/AviFollowButton.tsx b/src/view/com/posts/AviFollowButton.tsx index 0497c80bca..4096e4d712 100644 --- a/src/view/com/posts/AviFollowButton.tsx +++ b/src/view/com/posts/AviFollowButton.tsx @@ -3,24 +3,18 @@ import {View} from 'react-native' import {AppBskyActorDefs, ModerationDecision} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useNavigation} from '@react-navigation/native' import {createHitslop} from '#/lib/constants' -import {NavigationProp} from '#/lib/routes/types' import {useGate} from '#/lib/statsig/statsig' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useSession} from '#/state/session' -import { - DropdownItem, - NativeDropdown, -} from '#/view/com/util/forms/NativeDropdown' -import * as Toast from '#/view/com/util/Toast' import {atoms as a, select, useTheme} from '#/alf' import {Button} from '#/components/Button' -import {useFollowMethods} from '#/components/hooks/useFollowMethods' import {PlusSmall_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' +// @TODO Fabric + export function AviFollowButton({ author, moderation, @@ -33,13 +27,13 @@ export function AviFollowButton({ const {_} = useLingui() const t = useTheme() const profile = useProfileShadow(author) - const {follow} = useFollowMethods({ - profile: profile, - logContext: 'AvatarButton', - }) + // const {follow} = useFollowMethods({ + // profile: profile, + // logContext: 'AvatarButton', + // }) const gate = useGate() const {currentAccount, hasSession} = useSession() - const navigation = useNavigation() + // const navigation = useNavigation() const name = sanitizeDisplayName( profile.displayName || profile.handle, @@ -48,37 +42,37 @@ export function AviFollowButton({ const isFollowing = profile.viewer?.following || profile.did === currentAccount?.did - function onPress() { - follow() - Toast.show(_(msg`Following ${name}`)) - } + // function onPress() { + // follow() + // Toast.show(_(msg`Following ${name}`)) + // } - const items: DropdownItem[] = [ - { - label: _(msg`View profile`), - onPress: () => { - navigation.navigate('Profile', {name: profile.did}) - }, - icon: { - ios: { - name: 'arrow.up.right.square', - }, - android: '', - web: ['far', 'arrow-up-right-from-square'], - }, - }, - { - label: _(msg`Follow ${name}`), - onPress: onPress, - icon: { - ios: { - name: 'person.badge.plus', - }, - android: '', - web: ['far', 'user-plus'], - }, - }, - ] + // const items: DropdownItem[] = [ + // { + // label: _(msg`View profile`), + // onPress: () => { + // navigation.navigate('Profile', {name: profile.did}) + // }, + // icon: { + // ios: { + // name: 'arrow.up.right.square', + // }, + // android: '', + // web: ['far', 'arrow-up-right-from-square'], + // }, + // }, + // { + // label: _(msg`Follow ${name}`), + // onPress: onPress, + // icon: { + // ios: { + // name: 'person.badge.plus', + // }, + // android: '', + // web: ['far', 'user-plus'], + // }, + // }, + // ] return hasSession && gate('show_avi_follow_button') ? ( @@ -103,18 +97,18 @@ export function AviFollowButton({ borderColor: t.atoms.bg.backgroundColor, }, ]}> - - - + {/**/} + + {/**/} )} diff --git a/src/view/com/util/AccountDropdownBtn.tsx b/src/view/com/util/AccountDropdownBtn.tsx index 221879df79..25622d6fb4 100644 --- a/src/view/com/util/AccountDropdownBtn.tsx +++ b/src/view/com/util/AccountDropdownBtn.tsx @@ -1,50 +1,47 @@ import React from 'react' import {Pressable} from 'react-native' -import { - FontAwesomeIcon, - FontAwesomeIconStyle, -} from '@fortawesome/react-native-fontawesome' + +import {SessionAccount} from '#/state/session' import {s} from 'lib/styles' -import {usePalette} from 'lib/hooks/usePalette' -import {DropdownItem, NativeDropdown} from './forms/NativeDropdown' -import * as Toast from '../../com/util/Toast' -import {useSessionApi, SessionAccount} from '#/state/session' -import {useLingui} from '@lingui/react' -import {msg} from '@lingui/macro' -export function AccountDropdownBtn({account}: {account: SessionAccount}) { - const pal = usePalette('default') - const {removeAccount} = useSessionApi() - const {_} = useLingui() +// @TODO Fabric +export function AccountDropdownBtn({ + account: _account, +}: { + account: SessionAccount +}) { + // const pal = usePalette('default') + // const {removeAccount} = useSessionApi() + // const {_} = useLingui() - const items: DropdownItem[] = [ - { - label: _(msg`Remove account`), - onPress: () => { - removeAccount(account) - Toast.show(_(msg`Account removed from quick access`)) - }, - icon: { - ios: { - name: 'trash', - }, - android: 'ic_delete', - web: ['far', 'trash-can'], - }, - }, - ] + // const items: DropdownItem[] = [ + // { + // label: _(msg`Remove account`), + // onPress: () => { + // removeAccount(account) + // Toast.show(_(msg`Account removed from quick access`)) + // }, + // icon: { + // ios: { + // name: 'trash', + // }, + // android: 'ic_delete', + // web: ['far', 'trash-can'], + // }, + // }, + // ] return ( - - - + {/**/} + {/* */} + {/**/} ) } diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 72de428f30..4f46ade4cd 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -11,7 +11,7 @@ import {useQueryClient} from '@tanstack/react-query' import {useAnalytics} from '#/lib/analytics/analytics' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' -import {isNative, isWeb} from '#/platform/detection' +import {isNative} from '#/platform/detection' import {listenSoftReset} from '#/state/events' import {useModalControls} from '#/state/modals' import { @@ -41,9 +41,7 @@ import {ComposeIcon2} from 'lib/icons' import {makeListLink, makeProfileLink} from 'lib/routes/links' import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types' import {NavigationProp} from 'lib/routes/types' -import {shareUrl} from 'lib/sharing' import {sanitizeHandle} from 'lib/strings/handles' -import {toShareUrl} from 'lib/strings/url-helpers' import {s} from 'lib/styles' import {ListMembers} from '#/view/com/lists/ListMembers' import {PagerWithHeader} from 'view/com/pager/PagerWithHeader' @@ -52,7 +50,6 @@ import {ProfileSubpageHeader} from 'view/com/profile/ProfileSubpageHeader' import {EmptyState} from 'view/com/util/EmptyState' import {FAB} from 'view/com/util/fab/FAB' import {Button} from 'view/com/util/forms/Button' -import {DropdownItem, NativeDropdown} from 'view/com/util/forms/NativeDropdown' import {TextLink} from 'view/com/util/Link' import {ListRef} from 'view/com/util/List' import {LoadLatestBtn} from 'view/com/util/load-latest/LoadLatestBtn' @@ -74,6 +71,8 @@ interface SectionRef { scrollToTop: () => void } +// @TODO Fabric + type Props = NativeStackScreenProps export function ProfileListScreen(props: Props) { const {_} = useLingui() @@ -234,13 +233,13 @@ function ProfileListScreenLoaded({ } function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) { - const pal = usePalette('default') - const palInverted = usePalette('inverted') + // const pal = usePalette('default') + // const palInverted = usePalette('inverted') const {_} = useLingui() const navigation = useNavigation() const {currentAccount} = useSession() const reportDialogControl = useReportDialogControl() - const {openModal} = useModalControls() + // const {openModal} = useModalControls() const listMuteMutation = useListMuteMutation() const listBlockMutation = useListBlockMutation() const listDeleteMutation = useListDeleteMutation() @@ -248,7 +247,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) { const isModList = list.purpose === 'app.bsky.graph.defs#modlist' const isBlocking = !!list.viewer?.blocked const isMuting = !!list.viewer?.muted - const isOwner = list.creator.did === currentAccount?.did + // const isOwner = list.creator.did === currentAccount?.did const {data: preferences} = usePreferencesQuery() const {track} = useAnalytics() const playHaptic = useHaptics() @@ -312,17 +311,17 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) { savedFeedConfig, ]) - const onRemoveFromSavedFeeds = React.useCallback(async () => { - playHaptic() - if (!savedFeedConfig) return - try { - await removeSavedFeed(savedFeedConfig) - Toast.show(_(msg`Removed from your feeds`)) - } catch (e) { - Toast.show(_(msg`There was an issue contacting the server`)) - logger.error('Failed to remove pinned list', {message: e}) - } - }, [playHaptic, removeSavedFeed, _, savedFeedConfig]) + // const onRemoveFromSavedFeeds = React.useCallback(async () => { + // playHaptic() + // if (!savedFeedConfig) return + // try { + // await removeSavedFeed(savedFeedConfig) + // Toast.show(_(msg`Removed from your feeds`)) + // } catch (e) { + // Toast.show(_(msg`There was an issue contacting the server`)) + // logger.error('Failed to remove pinned list', {message: e}) + // } + // }, [playHaptic, removeSavedFeed, _, savedFeedConfig]) const onSubscribeMute = useCallback(async () => { try { @@ -380,12 +379,12 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) { } }, [list, listBlockMutation, track, _]) - const onPressEdit = useCallback(() => { - openModal({ - name: 'create-or-edit-list', - list, - }) - }, [openModal, list]) + // const onPressEdit = useCallback(() => { + // openModal({ + // name: 'create-or-edit-list', + // list, + // }) + // }, [openModal, list]) const onPressDelete = useCallback(async () => { await listDeleteMutation.mutateAsync({uri: list.uri}) @@ -411,188 +410,188 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) { savedFeedConfig, ]) - const onPressReport = useCallback(() => { - reportDialogControl.open() - }, [reportDialogControl]) + // const onPressReport = useCallback(() => { + // reportDialogControl.open() + // }, [reportDialogControl]) + // + // const onPressShare = useCallback(() => { + // const url = toShareUrl(`/profile/${list.creator.did}/lists/${rkey}`) + // shareUrl(url) + // track('Lists:Share') + // }, [list, rkey, track]) - const onPressShare = useCallback(() => { - const url = toShareUrl(`/profile/${list.creator.did}/lists/${rkey}`) - shareUrl(url) - track('Lists:Share') - }, [list, rkey, track]) + // const dropdownItems: DropdownItem[] = useMemo(() => { + // let items: DropdownItem[] = [ + // { + // testID: 'listHeaderDropdownShareBtn', + // label: isWeb ? _(msg`Copy link to list`) : _(msg`Share`), + // onPress: onPressShare, + // icon: { + // ios: { + // name: 'square.and.arrow.up', + // }, + // android: '', + // web: 'share', + // }, + // }, + // ] + // + // if (savedFeedConfig) { + // items.push({ + // testID: 'listHeaderDropdownRemoveFromFeedsBtn', + // label: _(msg`Remove from my feeds`), + // onPress: onRemoveFromSavedFeeds, + // icon: { + // ios: { + // name: 'trash', + // }, + // android: '', + // web: ['far', 'trash-can'], + // }, + // }) + // } + // + // if (isOwner) { + // items.push({label: 'separator'}) + // items.push({ + // testID: 'listHeaderDropdownEditBtn', + // label: _(msg`Edit list details`), + // onPress: onPressEdit, + // icon: { + // ios: { + // name: 'pencil', + // }, + // android: '', + // web: 'pen', + // }, + // }) + // items.push({ + // testID: 'listHeaderDropdownDeleteBtn', + // label: _(msg`Delete List`), + // onPress: deleteListPromptControl.open, + // icon: { + // ios: { + // name: 'trash', + // }, + // android: '', + // web: ['far', 'trash-can'], + // }, + // }) + // } else { + // items.push({label: 'separator'}) + // items.push({ + // testID: 'listHeaderDropdownReportBtn', + // label: _(msg`Report List`), + // onPress: onPressReport, + // icon: { + // ios: { + // name: 'exclamationmark.triangle', + // }, + // android: '', + // web: 'circle-exclamation', + // }, + // }) + // } + // if (isModList && isPinned) { + // items.push({label: 'separator'}) + // items.push({ + // testID: 'listHeaderDropdownUnpinBtn', + // label: _(msg`Unpin moderation list`), + // onPress: + // isPending || !savedFeedConfig + // ? undefined + // : () => removeSavedFeed(savedFeedConfig), + // icon: { + // ios: { + // name: 'pin', + // }, + // android: '', + // web: 'thumbtack', + // }, + // }) + // } + // if (isCurateList && (isBlocking || isMuting)) { + // items.push({label: 'separator'}) + // + // if (isMuting) { + // items.push({ + // testID: 'listHeaderDropdownMuteBtn', + // label: _(msg`Un-mute list`), + // onPress: onUnsubscribeMute, + // icon: { + // ios: { + // name: 'eye', + // }, + // android: '', + // web: 'eye', + // }, + // }) + // } + // + // if (isBlocking) { + // items.push({ + // testID: 'listHeaderDropdownBlockBtn', + // label: _(msg`Un-block list`), + // onPress: onUnsubscribeBlock, + // icon: { + // ios: { + // name: 'person.fill.xmark', + // }, + // android: '', + // web: 'user-slash', + // }, + // }) + // } + // } + // return items + // }, [ + // _, + // onPressShare, + // isOwner, + // isModList, + // isPinned, + // isCurateList, + // onPressEdit, + // deleteListPromptControl.open, + // onPressReport, + // isPending, + // isBlocking, + // isMuting, + // onUnsubscribeMute, + // onUnsubscribeBlock, + // removeSavedFeed, + // savedFeedConfig, + // onRemoveFromSavedFeeds, + // ]) - const dropdownItems: DropdownItem[] = useMemo(() => { - let items: DropdownItem[] = [ - { - testID: 'listHeaderDropdownShareBtn', - label: isWeb ? _(msg`Copy link to list`) : _(msg`Share`), - onPress: onPressShare, - icon: { - ios: { - name: 'square.and.arrow.up', - }, - android: '', - web: 'share', - }, - }, - ] - - if (savedFeedConfig) { - items.push({ - testID: 'listHeaderDropdownRemoveFromFeedsBtn', - label: _(msg`Remove from my feeds`), - onPress: onRemoveFromSavedFeeds, - icon: { - ios: { - name: 'trash', - }, - android: '', - web: ['far', 'trash-can'], - }, - }) - } - - if (isOwner) { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownEditBtn', - label: _(msg`Edit list details`), - onPress: onPressEdit, - icon: { - ios: { - name: 'pencil', - }, - android: '', - web: 'pen', - }, - }) - items.push({ - testID: 'listHeaderDropdownDeleteBtn', - label: _(msg`Delete List`), - onPress: deleteListPromptControl.open, - icon: { - ios: { - name: 'trash', - }, - android: '', - web: ['far', 'trash-can'], - }, - }) - } else { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownReportBtn', - label: _(msg`Report List`), - onPress: onPressReport, - icon: { - ios: { - name: 'exclamationmark.triangle', - }, - android: '', - web: 'circle-exclamation', - }, - }) - } - if (isModList && isPinned) { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownUnpinBtn', - label: _(msg`Unpin moderation list`), - onPress: - isPending || !savedFeedConfig - ? undefined - : () => removeSavedFeed(savedFeedConfig), - icon: { - ios: { - name: 'pin', - }, - android: '', - web: 'thumbtack', - }, - }) - } - if (isCurateList && (isBlocking || isMuting)) { - items.push({label: 'separator'}) - - if (isMuting) { - items.push({ - testID: 'listHeaderDropdownMuteBtn', - label: _(msg`Un-mute list`), - onPress: onUnsubscribeMute, - icon: { - ios: { - name: 'eye', - }, - android: '', - web: 'eye', - }, - }) - } - - if (isBlocking) { - items.push({ - testID: 'listHeaderDropdownBlockBtn', - label: _(msg`Un-block list`), - onPress: onUnsubscribeBlock, - icon: { - ios: { - name: 'person.fill.xmark', - }, - android: '', - web: 'user-slash', - }, - }) - } - } - return items - }, [ - _, - onPressShare, - isOwner, - isModList, - isPinned, - isCurateList, - onPressEdit, - deleteListPromptControl.open, - onPressReport, - isPending, - isBlocking, - isMuting, - onUnsubscribeMute, - onUnsubscribeBlock, - removeSavedFeed, - savedFeedConfig, - onRemoveFromSavedFeeds, - ]) - - const subscribeDropdownItems: DropdownItem[] = useMemo(() => { - return [ - { - testID: 'subscribeDropdownMuteBtn', - label: _(msg`Mute accounts`), - onPress: subscribeMutePromptControl.open, - icon: { - ios: { - name: 'speaker.slash', - }, - android: '', - web: 'user-slash', - }, - }, - { - testID: 'subscribeDropdownBlockBtn', - label: _(msg`Block accounts`), - onPress: subscribeBlockPromptControl.open, - icon: { - ios: { - name: 'person.fill.xmark', - }, - android: '', - web: 'ban', - }, - }, - ] - }, [_, subscribeMutePromptControl.open, subscribeBlockPromptControl.open]) + // const subscribeDropdownItems: DropdownItem[] = useMemo(() => { + // return [ + // { + // testID: 'subscribeDropdownMuteBtn', + // label: _(msg`Mute accounts`), + // onPress: subscribeMutePromptControl.open, + // icon: { + // ios: { + // name: 'speaker.slash', + // }, + // android: '', + // web: 'user-slash', + // }, + // }, + // { + // testID: 'subscribeDropdownBlockBtn', + // label: _(msg`Block accounts`), + // onPress: subscribeBlockPromptControl.open, + // icon: { + // ios: { + // name: 'person.fill.xmark', + // }, + // android: '', + // web: 'ban', + // }, + // }, + // ] + // }, [_, subscribeMutePromptControl.open, subscribeBlockPromptControl.open]) return ( - ) : ( - - - - Subscribe - - - - ) - ) : null} - - - - - + ) : null + ) : // + // + // + // Subscribe + // + // + // + null} + {/**/} + {/* */} + {/* */} + {/* */} + {/**/}