Browse Source

fix bug where revoking a follow request was not possible

pull/722/head
Conny Duck 8 years ago
parent
commit
0102a4bd60
  1. 3
      app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt

3
app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountViewModel.kt

@ -83,7 +83,8 @@ class AccountViewModel @Inject constructor(
}
fun changeFollowState(id: String) {
if (relationshipData.value?.data?.following == true) {
val relationship = relationshipData.value?.data
if (relationship?.following == true || relationship?.requested == true) {
changeRelationship(RelationShipAction.UNFOLLOW, id)
} else {
changeRelationship(RelationShipAction.FOLLOW, id)

Loading…
Cancel
Save