no follow self (#7606)
This commit is contained in:
@@ -683,6 +683,7 @@ function Overlay({
|
|||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {openComposer} = useComposerControls()
|
const {openComposer} = useComposerControls()
|
||||||
|
const {currentAccount} = useSession()
|
||||||
const navigation = useNavigation<NavigationProp>()
|
const navigation = useNavigation<NavigationProp>()
|
||||||
const seekingAnimationSV = useSharedValue(0)
|
const seekingAnimationSV = useSharedValue(0)
|
||||||
|
|
||||||
@@ -790,37 +791,38 @@ function Overlay({
|
|||||||
</View>
|
</View>
|
||||||
</Link>
|
</Link>
|
||||||
{/* show button based on non-reactive version, so it doesn't hide on press */}
|
{/* show button based on non-reactive version, so it doesn't hide on press */}
|
||||||
{!post.author.viewer?.following && (
|
{post.author.did !== currentAccount?.did &&
|
||||||
<Button
|
!post.author.viewer?.following && (
|
||||||
label={
|
<Button
|
||||||
profile.viewer?.following
|
label={
|
||||||
? _(msg`Following ${handle}`)
|
profile.viewer?.following
|
||||||
: _(msg`Follow ${handle}`)
|
? _(msg`Following ${handle}`)
|
||||||
}
|
: _(msg`Follow ${handle}`)
|
||||||
accessibilityHint={
|
}
|
||||||
profile.viewer?.following ? _(msg`Unfollow user`) : ''
|
accessibilityHint={
|
||||||
}
|
profile.viewer?.following ? _(msg`Unfollow user`) : ''
|
||||||
size="small"
|
}
|
||||||
variant="solid"
|
size="small"
|
||||||
color="secondary_inverted"
|
variant="solid"
|
||||||
style={[a.mb_xs]}
|
color="secondary_inverted"
|
||||||
onPress={() =>
|
style={[a.mb_xs]}
|
||||||
profile.viewer?.following
|
onPress={() =>
|
||||||
? queueUnfollow()
|
profile.viewer?.following
|
||||||
: queueFollow()
|
? queueUnfollow()
|
||||||
}>
|
: queueFollow()
|
||||||
{!!profile.viewer?.following && (
|
}>
|
||||||
<ButtonIcon icon={CheckIcon} />
|
{!!profile.viewer?.following && (
|
||||||
)}
|
<ButtonIcon icon={CheckIcon} />
|
||||||
<ButtonText>
|
|
||||||
{profile.viewer?.following ? (
|
|
||||||
<Trans>Following</Trans>
|
|
||||||
) : (
|
|
||||||
<Trans>Follow</Trans>
|
|
||||||
)}
|
)}
|
||||||
</ButtonText>
|
<ButtonText>
|
||||||
</Button>
|
{profile.viewer?.following ? (
|
||||||
)}
|
<Trans>Following</Trans>
|
||||||
|
) : (
|
||||||
|
<Trans>Follow</Trans>
|
||||||
|
)}
|
||||||
|
</ButtonText>
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
{record?.text?.trim() && (
|
{record?.text?.trim() && (
|
||||||
<ExpandableRichTextView
|
<ExpandableRichTextView
|
||||||
|
|||||||
Reference in New Issue
Block a user