From a82bbd25e35561e835653a5ac5cbe7ba09cc0b46 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 25 Jul 2022 16:54:54 +0200 Subject: [PATCH] Cant subscribe to notifications for an account --- .../android/activities/ProfileActivity.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java index 2d8930499..eac9b80cb 100644 --- a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java @@ -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 -> { if (doAction == action.NOTHING) { @@ -570,6 +561,16 @@ public class ProfileActivity extends BaseActivity { } else { 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 if (relationship.note == null || relationship.note.trim().isEmpty()) { binding.personalNote.setText(R.string.note_for_account);