From aa449c3a80e95413121efe6c87e712203d3bb837 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 19 Mar 2017 14:42:41 +0100 Subject: [PATCH] Refactoring --- .../main/java/eu/faircode/netguard/AdapterRule.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/AdapterRule.java b/app/src/main/java/eu/faircode/netguard/AdapterRule.java index 8276d967..0d71737f 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterRule.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterRule.java @@ -499,17 +499,17 @@ public class AdapterRule extends RecyclerView.Adapter im } }); + // Show mobile screen on condition + holder.llScreenOther.setVisibility(screen_on ? View.VISIBLE : View.GONE); + holder.cbScreenOther.setEnabled(rule.other_blocked && rule.apply); + holder.cbScreenOther.setOnCheckedChangeListener(null); + holder.cbScreenOther.setChecked(rule.screen_other); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { Drawable wrap = DrawableCompat.wrap(holder.ivOtherLegend.getDrawable()); DrawableCompat.setTint(wrap, colorOn); } - // Show mobile screen on condition - holder.llScreenOther.setVisibility(screen_on ? View.VISIBLE : View.GONE); - holder.cbScreenOther.setEnabled(rule.other_blocked && rule.apply); - holder.cbScreenOther.setOnCheckedChangeListener(null); - holder.cbScreenOther.setChecked(rule.screen_other); holder.cbScreenOther.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {