|
|
@ -118,6 +118,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
private CheckBox cbNotify;
|
|
|
|
private CheckBox cbNotify;
|
|
|
|
private CheckBox cbBrowse;
|
|
|
|
private CheckBox cbBrowse;
|
|
|
|
private EditText etInterval;
|
|
|
|
private EditText etInterval;
|
|
|
|
|
|
|
|
private CheckBox cbPartialFetch;
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnCheck;
|
|
|
|
private Button btnCheck;
|
|
|
|
private ContentLoadingProgressBar pbCheck;
|
|
|
|
private ContentLoadingProgressBar pbCheck;
|
|
|
@ -194,6 +195,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
cbNotify = view.findViewById(R.id.cbNotify);
|
|
|
|
cbNotify = view.findViewById(R.id.cbNotify);
|
|
|
|
cbBrowse = view.findViewById(R.id.cbBrowse);
|
|
|
|
cbBrowse = view.findViewById(R.id.cbBrowse);
|
|
|
|
etInterval = view.findViewById(R.id.etInterval);
|
|
|
|
etInterval = view.findViewById(R.id.etInterval);
|
|
|
|
|
|
|
|
cbPartialFetch = view.findViewById(R.id.cbPartialFetch);
|
|
|
|
|
|
|
|
|
|
|
|
btnCheck = view.findViewById(R.id.btnCheck);
|
|
|
|
btnCheck = view.findViewById(R.id.btnCheck);
|
|
|
|
pbCheck = view.findViewById(R.id.pbCheck);
|
|
|
|
pbCheck = view.findViewById(R.id.pbCheck);
|
|
|
@ -756,6 +758,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
args.putBoolean("notify", cbNotify.isChecked());
|
|
|
|
args.putBoolean("notify", cbNotify.isChecked());
|
|
|
|
args.putBoolean("browse", cbBrowse.isChecked());
|
|
|
|
args.putBoolean("browse", cbBrowse.isChecked());
|
|
|
|
args.putString("interval", etInterval.getText().toString());
|
|
|
|
args.putString("interval", etInterval.getText().toString());
|
|
|
|
|
|
|
|
args.putBoolean("partial_fetch", cbPartialFetch.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
args.putSerializable("drafts", drafts);
|
|
|
|
args.putSerializable("drafts", drafts);
|
|
|
|
args.putSerializable("sent", sent);
|
|
|
|
args.putSerializable("sent", sent);
|
|
|
@ -804,6 +807,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
boolean notify = args.getBoolean("notify");
|
|
|
|
boolean notify = args.getBoolean("notify");
|
|
|
|
boolean browse = args.getBoolean("browse");
|
|
|
|
boolean browse = args.getBoolean("browse");
|
|
|
|
String interval = args.getString("interval");
|
|
|
|
String interval = args.getString("interval");
|
|
|
|
|
|
|
|
boolean partial_fetch = args.getBoolean("partial_fetch");
|
|
|
|
|
|
|
|
|
|
|
|
EntityFolder drafts = (EntityFolder) args.getSerializable("drafts");
|
|
|
|
EntityFolder drafts = (EntityFolder) args.getSerializable("drafts");
|
|
|
|
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
|
|
|
|
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
|
|
|
@ -846,7 +850,8 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
boolean reload = (check || account == null ||
|
|
|
|
boolean reload = (check || account == null ||
|
|
|
|
account.synchronize != synchronize ||
|
|
|
|
account.synchronize != synchronize ||
|
|
|
|
account.notify != notify ||
|
|
|
|
account.notify != notify ||
|
|
|
|
!account.poll_interval.equals(Integer.parseInt(interval)));
|
|
|
|
!account.poll_interval.equals(Integer.parseInt(interval)) ||
|
|
|
|
|
|
|
|
account.partial_fetch != partial_fetch);
|
|
|
|
|
|
|
|
|
|
|
|
Long last_connected = null;
|
|
|
|
Long last_connected = null;
|
|
|
|
if (account != null && synchronize == account.synchronize)
|
|
|
|
if (account != null && synchronize == account.synchronize)
|
|
|
@ -920,6 +925,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
account.notify = notify;
|
|
|
|
account.notify = notify;
|
|
|
|
account.browse = browse;
|
|
|
|
account.browse = browse;
|
|
|
|
account.poll_interval = Integer.parseInt(interval);
|
|
|
|
account.poll_interval = Integer.parseInt(interval);
|
|
|
|
|
|
|
|
account.partial_fetch = partial_fetch;
|
|
|
|
|
|
|
|
|
|
|
|
if (!update)
|
|
|
|
if (!update)
|
|
|
|
account.created = now;
|
|
|
|
account.created = now;
|
|
|
@ -1136,6 +1142,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
cbPrimary.setChecked(account == null ? false : account.primary);
|
|
|
|
cbPrimary.setChecked(account == null ? false : account.primary);
|
|
|
|
cbBrowse.setChecked(account == null ? true : account.browse);
|
|
|
|
cbBrowse.setChecked(account == null ? true : account.browse);
|
|
|
|
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
|
|
|
|
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
|
|
|
|
|
|
|
|
cbPartialFetch.setChecked(account == null ? true : account.partial_fetch);
|
|
|
|
|
|
|
|
|
|
|
|
color = (account == null || account.color == null ? Color.TRANSPARENT : account.color);
|
|
|
|
color = (account == null || account.color == null ? Color.TRANSPARENT : account.color);
|
|
|
|
|
|
|
|
|
|
|
|