Fixed cannot unselect when setUsing

This commit is contained in:
PeratX 2017-05-20 23:34:18 +08:00
parent db578bca8c
commit de5574df45

View File

@ -201,7 +201,7 @@ public class RulesFragment extends Fragment {
public void onClick(View v) {
if (!Daedalus.getInstance().isServiceActivated()) {
Rule rule = Rule.getRuleById(id);
if (rule != null && !rule.isUsing()) {
if (rule != null) {
rule.setUsing(!v.isSelected());
v.setSelected(!v.isSelected());
if (v.isSelected()) {