mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-22 07:43:15 +00:00
Do not reload rules on opening UI
This commit is contained in:
parent
1a2670424b
commit
58412e27da
1 changed files with 1 additions and 1 deletions
|
@ -53,6 +53,7 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
|
||||
// On/off switch
|
||||
Switch swEnabled = (Switch) view.findViewById(R.id.swEnabled);
|
||||
swEnabled.setChecked(prefs.getBoolean("enabled", false));
|
||||
swEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
|
@ -74,7 +75,6 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
}
|
||||
}
|
||||
});
|
||||
swEnabled.setChecked(prefs.getBoolean("enabled", false));
|
||||
|
||||
// Listen for preference changes
|
||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||
|
|
Loading…
Reference in a new issue