diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java index f2ef472d6..ecd3e5833 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/AccountAdapter.java @@ -54,7 +54,6 @@ import es.dmoral.toasty.Toasty; public class AccountAdapter extends RecyclerView.Adapter { - private static ProfileActivity.action doAction; private final List accountList; private Context context; @@ -82,7 +81,7 @@ public class AccountAdapter extends RecyclerView.Adapter { - if (doAction == ProfileActivity.action.NOTHING) { + if (finalDoAction == ProfileActivity.action.NOTHING) { Toasty.info(context, context.getString(R.string.nothing_to_do), Toast.LENGTH_LONG).show(); - } else if (doAction == ProfileActivity.action.FOLLOW) { + } else if (finalDoAction == ProfileActivity.action.FOLLOW) { accountViewHolder.binding.followAction.setEnabled(false); accountsVM.follow(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, account.id, true, false) .observe((LifecycleOwner) context, relationShip -> { account.relationShip = relationShip; adapter.notifyItemChanged(position); }); - } else if (doAction == ProfileActivity.action.UNFOLLOW) { + } else if (finalDoAction == ProfileActivity.action.UNFOLLOW) { boolean confirm_unfollow = sharedpreferences.getBoolean(context.getString(R.string.SET_UNFOLLOW_VALIDATION), true); if (confirm_unfollow) { AlertDialog.Builder unfollowConfirm = new AlertDialog.Builder(context, Helper.dialogStyle());