diff options
Diffstat (limited to 'src/view/screens')
-rw-r--r-- | src/view/screens/CustomFeed.tsx | 27 | ||||
-rw-r--r-- | src/view/screens/Settings.tsx | 20 |
2 files changed, 31 insertions, 16 deletions
diff --git a/src/view/screens/CustomFeed.tsx b/src/view/screens/CustomFeed.tsx index 61550c683..d5ecff042 100644 --- a/src/view/screens/CustomFeed.tsx +++ b/src/view/screens/CustomFeed.tsx @@ -29,10 +29,10 @@ import {Haptics} from 'lib/haptics' import {ComposeIcon2} from 'lib/icons' import {FAB} from '../com/util/fab/FAB' import {LoadLatestBtn} from 'view/com/util/load-latest/LoadLatestBtn' -import {DropdownButton, DropdownItem} from 'view/com/util/forms/DropdownButton' import {useOnMainScroll} from 'lib/hooks/useOnMainScroll' import {EmptyState} from 'view/com/util/EmptyState' import {useAnalytics} from 'lib/analytics/analytics' +import {NativeDropdown, DropdownItem} from 'view/com/util/forms/NativeDropdown' import {makeProfileLink} from 'lib/routes/links' type Props = NativeStackScreenProps<CommonNavigatorParams, 'CustomFeed'> @@ -121,11 +121,25 @@ export const CustomFeedScreen = withAuthRequired( testID: 'feedHeaderDropdownRemoveBtn', label: 'Remove from my feeds', onPress: onToggleSaved, + icon: { + ios: { + name: 'trash', + }, + android: 'ic_delete', + web: 'trash', + }, }, { testID: 'feedHeaderDropdownShareBtn', label: 'Share link', onPress: onPressShare, + icon: { + ios: { + name: 'square.and.arrow.up', + }, + android: 'ic_menu_share', + web: 'share', + }, }, ] return items @@ -163,17 +177,10 @@ export const CustomFeedScreen = withAuthRequired( </Button> ) : undefined} {currentFeed?.isSaved ? ( - <DropdownButton + <NativeDropdown testID="feedHeaderDropdownBtn" - type="default-light" items={dropdownItems} - menuWidth={250}> - <FontAwesomeIcon - icon="ellipsis" - color={pal.colors.textLight} - size={18} - /> - </DropdownButton> + /> ) : ( <Button type="default-light" diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index dd456c35e..47aa65585 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -3,6 +3,7 @@ import { ActivityIndicator, Linking, Platform, + Pressable, StyleSheet, TextStyle, TouchableOpacity, @@ -30,7 +31,6 @@ import {Link} from '../com/util/Link' import {Text} from '../com/util/text/Text' import * as Toast from '../com/util/Toast' import {UserAvatar} from '../com/util/UserAvatar' -import {DropdownButton} from 'view/com/util/forms/DropdownButton' import {ToggleButton} from 'view/com/util/forms/ToggleButton' import {SelectableBtn} from 'view/com/util/forms/SelectableBtn' import {usePalette} from 'lib/hooks/usePalette' @@ -50,6 +50,7 @@ import {makeProfileLink} from 'lib/routes/links' // -prf import {useDebugHeaderSetting} from 'lib/api/debug-appview-proxy-header' import {STATUS_PAGE_URL} from 'lib/constants' +import {DropdownItem, NativeDropdown} from 'view/com/util/forms/NativeDropdown' type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'> export const SettingsScreen = withAuthRequired( @@ -565,24 +566,31 @@ export const SettingsScreen = withAuthRequired( function AccountDropdownBtn({handle}: {handle: string}) { const store = useStores() const pal = usePalette('default') - const items = [ + const items: DropdownItem[] = [ { label: 'Remove account', onPress: () => { store.session.removeAccount(handle) Toast.show('Account removed from quick access') }, + icon: { + ios: { + name: 'trash', + }, + android: 'ic_delete', + web: 'trash', + }, }, ] return ( - <View style={s.pl10}> - <DropdownButton type="bare" items={items}> + <Pressable accessibilityRole="button" style={s.pl10}> + <NativeDropdown testID="accountSettingsDropdownBtn" items={items}> <FontAwesomeIcon icon="ellipsis-h" style={pal.textLight as FontAwesomeIconStyle} /> - </DropdownButton> - </View> + </NativeDropdown> + </Pressable> ) } |