aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
index e37ea6121..391fee0b9 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
@@ -85,13 +85,17 @@ public class AccountAdapter extends ArrayAdapter<Account> {
tglAccountState.setVisibility(View.GONE);
}
tglAccountState.setOnCheckedChangeListener((compoundButton, b) -> {
- if (b == isDisabled && activity instanceof ManageAccountActivity) {
- ((ManageAccountActivity) activity).onClickTglAccountState(account, b);
+ if (b == isDisabled && activity instanceof OnTglAccountState) {
+ ((OnTglAccountState) activity).onClickTglAccountState(account, b);
}
});
return view;
}
+ public interface OnTglAccountState {
+ void onClickTglAccountState(Account account, boolean state);
+ }
+
public static boolean cancelPotentialWork(Account account, ImageView imageView) {
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);