From 7f79f764d51f8b1d7dc3fd9458373baccd0cc06c Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 19 Oct 2019 21:23:50 +0200 Subject: fix #8966, battery dialog reopening --- .../java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src') diff --git a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java index 21a25997..7f52911b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java @@ -289,6 +289,9 @@ public class NavigationDrawerFragment extends Fragment { saveBattery = drawerView.findViewById(R.id.battery_switch); saveBattery.setChecked(getSaveBattery(getContext())); saveBattery.setOnCheckedChangeListener(((buttonView, isChecked) -> { + if (!buttonView.isPressed()) { + return; + } if (isChecked) { showExperimentalFeatureAlert(); } else { -- cgit v1.2.3