Couple of fixes

This commit is contained in:
Eric Bailey
2024-12-11 16:03:08 -06:00
parent 3a5cb7e370
commit 329b254de1
@@ -124,9 +124,9 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
]) ])
if (pinned) { if (pinned) {
Toast.show(_(msg`Pinned to your home screen`)) Toast.show(_(msg`Pinned ${info.displayName} to Home`))
} else { } else {
Toast.show(_(msg`Un-pinned from your home screen`)) Toast.show(_(msg`Un-pinned ${info.displayName} from Home`))
} }
} else { } else {
await addSavedFeeds([ await addSavedFeeds([
@@ -136,7 +136,7 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
pinned: true, pinned: true,
}, },
]) ])
Toast.show(_(msg`Pinned to your home screen`)) Toast.show(_(msg`Pinned ${info.displayName} to Home`))
} }
} catch (e) { } catch (e) {
Toast.show(_(msg`There was an issue contacting the server`), 'xmark') Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
@@ -166,7 +166,10 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
paddingRight: 12, paddingRight: 12,
}, },
]} ]}
onPress={() => infoControl.open()}> onPress={() => {
playHaptic()
infoControl.open()
}}>
{({hovered, pressed}) => ( {({hovered, pressed}) => (
<> <>
<View <View
@@ -253,9 +256,7 @@ export function ProfileFeedHeader({info}: {info: FeedSourceFeedInfo}) {
return ( return (
<Button <Button
{...props} {...props}
label={_( label={_(msg`Open feed options menu`)}
msg`Pin ${info.displayName} to your home screen`,
)}
size="small" size="small"
variant="ghost" variant="ghost"
shape="square" shape="square"
@@ -381,9 +382,10 @@ function DialogInner({
}, [playHaptic, isLiked, likeUri, unlikeFeed, setLikeUri, likeFeed, info, _]) }, [playHaptic, isLiked, likeUri, unlikeFeed, setLikeUri, likeFeed, info, _])
const onPressShare = React.useCallback(() => { const onPressShare = React.useCallback(() => {
playHaptic()
const url = toShareUrl(info.route.href) const url = toShareUrl(info.route.href)
shareUrl(url) shareUrl(url)
}, [info]) }, [info, playHaptic])
const onPressReport = React.useCallback(() => { const onPressReport = React.useCallback(() => {
reportDialogControl.open() reportDialogControl.open()
@@ -459,7 +461,7 @@ function DialogInner({
<View style={[a.flex_row, a.gap_sm, a.align_center, a.pt_sm]}> <View style={[a.flex_row, a.gap_sm, a.align_center, a.pt_sm]}>
<Button <Button
disabled={isLikePending || isUnlikePending} disabled={isLikePending || isUnlikePending}
label={_(msg`Report feed`)} label={_(msg`Like feed`)}
size="small" size="small"
variant="solid" variant="solid"
color="secondary" color="secondary"
@@ -477,7 +479,7 @@ function DialogInner({
</Button> </Button>
<Button <Button
disabled={isFeedStateChangePending} disabled={isFeedStateChangePending}
label={_(msg`Report feed`)} label={isPinned ? _(msg`Unpin feed`) : _(msg`Pin feed`)}
size="small" size="small"
variant="solid" variant="solid"
color={isPinned ? 'secondary' : 'primary'} color={isPinned ? 'secondary' : 'primary'}