Cant subscribe to notifications for an account

This commit is contained in:
Thomas 2022-07-25 16:54:54 +02:00
parent d2b7ce3909
commit a82bbd25e3
1 changed files with 11 additions and 10 deletions

View File

@ -393,16 +393,7 @@ public class ProfileActivity extends BaseActivity {
}); });
binding.accountNotification.setOnClickListener(v -> {
if (relationship != null && relationship.followed_by) {
relationship.notifying = !relationship.notifying;
accountsVM.follow(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, account.id, relationship.showing_reblogs, relationship.notifying)
.observe(ProfileActivity.this, relationShip -> {
this.relationship = relationShip;
updateAccount();
});
}
});
binding.accountFollow.setOnClickListener(v -> { binding.accountFollow.setOnClickListener(v -> {
if (doAction == action.NOTHING) { if (doAction == action.NOTHING) {
@ -570,6 +561,16 @@ public class ProfileActivity extends BaseActivity {
} else { } else {
binding.accountNotification.setImageResource(R.drawable.ic_baseline_notifications_off_24); binding.accountNotification.setImageResource(R.drawable.ic_baseline_notifications_off_24);
} }
binding.accountNotification.setOnClickListener(v -> {
if (relationship != null && relationship.following) {
relationship.notifying = !relationship.notifying;
accountsVM.follow(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, account.id, relationship.showing_reblogs, relationship.notifying)
.observe(ProfileActivity.this, relationShip -> {
this.relationship = relationShip;
updateAccount();
});
}
});
//Account note //Account note
if (relationship.note == null || relationship.note.trim().isEmpty()) { if (relationship.note == null || relationship.note.trim().isEmpty()) {
binding.personalNote.setText(R.string.note_for_account); binding.personalNote.setText(R.string.note_for_account);