mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Added settings to leave deleted POP3 messages on server
This commit is contained in:
@@ -81,6 +81,7 @@ public class FragmentPop extends FragmentBase {
|
||||
private CheckBox cbOnDemand;
|
||||
private CheckBox cbPrimary;
|
||||
private CheckBox cbLeaveServer;
|
||||
private CheckBox cbLeaveDeleted;
|
||||
private CheckBox cbLeaveDevice;
|
||||
private EditText etMax;
|
||||
private EditText etInterval;
|
||||
@@ -135,6 +136,7 @@ public class FragmentPop extends FragmentBase {
|
||||
cbNotify = view.findViewById(R.id.cbNotify);
|
||||
tvNotifyPro = view.findViewById(R.id.tvNotifyPro);
|
||||
cbLeaveServer = view.findViewById(R.id.cbLeaveServer);
|
||||
cbLeaveDeleted = view.findViewById(R.id.cbLeaveDeleted);
|
||||
cbLeaveDevice = view.findViewById(R.id.cbLeaveDevice);
|
||||
etMax = view.findViewById(R.id.etMax);
|
||||
etInterval = view.findViewById(R.id.etInterval);
|
||||
@@ -241,6 +243,7 @@ public class FragmentPop extends FragmentBase {
|
||||
args.putBoolean("primary", cbPrimary.isChecked());
|
||||
args.putBoolean("notify", cbNotify.isChecked());
|
||||
args.putBoolean("leave_server", cbLeaveServer.isChecked());
|
||||
args.putBoolean("leave_deleted", cbLeaveDeleted.isChecked());
|
||||
args.putBoolean("leave_device", cbLeaveDevice.isChecked());
|
||||
args.putString("max", etMax.getText().toString());
|
||||
args.putString("interval", etInterval.getText().toString());
|
||||
@@ -281,6 +284,7 @@ public class FragmentPop extends FragmentBase {
|
||||
boolean primary = args.getBoolean("primary");
|
||||
boolean notify = args.getBoolean("notify");
|
||||
boolean leave_server = args.getBoolean("leave_server");
|
||||
boolean leave_deleted = args.getBoolean("leave_deleted");
|
||||
boolean leave_device = args.getBoolean("leave_device");
|
||||
String max = args.getString("max");
|
||||
String interval = args.getString("interval");
|
||||
@@ -372,6 +376,7 @@ public class FragmentPop extends FragmentBase {
|
||||
account.primary = (account.synchronize && primary);
|
||||
account.notify = notify;
|
||||
account.leave_on_server = leave_server;
|
||||
account.leave_deleted = leave_deleted;
|
||||
account.leave_on_device = leave_device;
|
||||
account.max_messages = (TextUtils.isEmpty(max) ? null : Integer.parseInt(max));
|
||||
account.poll_interval = Integer.parseInt(interval);
|
||||
@@ -532,6 +537,7 @@ public class FragmentPop extends FragmentBase {
|
||||
cbOnDemand.setChecked(account == null ? false : account.ondemand);
|
||||
cbPrimary.setChecked(account == null ? false : account.primary);
|
||||
cbLeaveServer.setChecked(account == null ? true : account.leave_on_server);
|
||||
cbLeaveDeleted.setChecked(account == null ? true : account.leave_deleted);
|
||||
cbLeaveDevice.setChecked(account == null ? false : account.leave_on_device);
|
||||
etMax.setText(account == null || account.max_messages == null ? null : Integer.toString(account.max_messages));
|
||||
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
|
||||
|
||||
Reference in New Issue
Block a user