Small improvement

This commit is contained in:
M66B 2020-03-30 14:15:29 +02:00
parent f3e08b3f9e
commit 2bb62f85bd
1 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("suggest_sent", checked).apply();
swSuggestFrequently.setEnabled(swSuggestSent.isChecked() || swSuggestReceived.isChecked());
}
});
@ -128,6 +129,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("suggest_received", checked).apply();
swSuggestFrequently.setEnabled(swSuggestSent.isChecked() || swSuggestReceived.isChecked());
}
});
@ -310,6 +312,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swSuggestSent.setChecked(prefs.getBoolean("suggest_sent", true));
swSuggestReceived.setChecked(prefs.getBoolean("suggest_received", false));
swSuggestFrequently.setChecked(prefs.getBoolean("suggest_frequently", false));
swSuggestFrequently.setEnabled(swSuggestSent.isChecked() || swSuggestReceived.isChecked());
swSendReminders.setChecked(prefs.getBoolean("send_reminders", true));
int send_delayed = prefs.getInt("send_delayed", 0);