aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/adapter
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-01-25 23:16:28 +0100
committerChristian Schneppe <christian@pix-art.de>2019-01-25 23:16:28 +0100
commit52ff46043c9ad94fe55ddd0b6db323ec951456f2 (patch)
treeadd46ef8bae3a216fbfd68a77ded0bd59b273736 /src/main/java/de/pixart/messenger/ui/adapter
parentce2cf51df08b8b0ad4250c3396975108aa3f5085 (diff)
provide Set as Profile intent
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter')
-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);