Implement unfollow, unlike, unrepost
This commit is contained in:
parent
aabde2b401
commit
a8c8286b88
6 changed files with 61 additions and 41 deletions
|
@ -48,7 +48,7 @@ export function Component({replyTo}: {replyTo?: string}) {
|
|||
return false
|
||||
}
|
||||
try {
|
||||
await apilib.post(store.api, 'alice.test', text, replyTo)
|
||||
await apilib.post(store.api, 'did:test:alice', text, replyTo)
|
||||
} catch (e: any) {
|
||||
console.error(`Failed to create post: ${e.toString()}`)
|
||||
setError(
|
||||
|
|
|
@ -30,7 +30,7 @@ export const ProfileHeader = observer(function ProfileHeader({
|
|||
view?.toggleFollowing().then(
|
||||
() => {
|
||||
Toast.show(
|
||||
`${view.myState.hasFollowed ? 'Following' : 'No longer following'} ${
|
||||
`${view.myState.follow ? 'Following' : 'No longer following'} ${
|
||||
view.displayName || view.name
|
||||
}`,
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ export const ProfileHeader = observer(function ProfileHeader({
|
|||
style={[styles.mainBtn, styles.btn]}>
|
||||
<Text style={[s.fw400, s.f14]}>Edit Profile</Text>
|
||||
</TouchableOpacity>
|
||||
) : view.myState.hasFollowed ? (
|
||||
) : view.myState.follow ? (
|
||||
<TouchableOpacity
|
||||
onPress={onPressToggleFollow}
|
||||
style={[styles.mainBtn, styles.btn]}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue