|
|
|
@ -125,6 +125,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
private TextView tvNotifyPro;
|
|
|
|
|
private CheckBox cbBrowse;
|
|
|
|
|
private CheckBox cbAutoSeen;
|
|
|
|
|
private CheckBox cbLeaveDevice;
|
|
|
|
|
private EditText etInterval;
|
|
|
|
|
private CheckBox cbNoop;
|
|
|
|
|
private CheckBox cbPartialFetch;
|
|
|
|
@ -244,6 +245,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
tvNotifyPro = view.findViewById(R.id.tvNotifyPro);
|
|
|
|
|
cbBrowse = view.findViewById(R.id.cbBrowse);
|
|
|
|
|
cbAutoSeen = view.findViewById(R.id.cbAutoSeen);
|
|
|
|
|
cbLeaveDevice = view.findViewById(R.id.cbLeaveDevice);
|
|
|
|
|
etInterval = view.findViewById(R.id.etInterval);
|
|
|
|
|
cbNoop = view.findViewById(R.id.cbNoop);
|
|
|
|
|
cbPartialFetch = view.findViewById(R.id.cbPartialFetch);
|
|
|
|
@ -511,6 +513,9 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
etInterval.setHint(Integer.toString(EntityAccount.DEFAULT_KEEP_ALIVE_INTERVAL));
|
|
|
|
|
|
|
|
|
|
if (!BuildConfig.DEBUG)
|
|
|
|
|
Helper.hide(cbLeaveDevice);
|
|
|
|
|
|
|
|
|
|
btnCheck.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
@ -933,6 +938,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
args.putBoolean("notify", cbNotify.isChecked());
|
|
|
|
|
args.putBoolean("browse", cbBrowse.isChecked());
|
|
|
|
|
args.putBoolean("auto_seen", cbAutoSeen.isChecked());
|
|
|
|
|
args.putBoolean("leave_device", cbLeaveDevice.isChecked());
|
|
|
|
|
args.putString("interval", etInterval.getText().toString());
|
|
|
|
|
args.putBoolean("noop", cbNoop.isChecked());
|
|
|
|
|
args.putBoolean("partial_fetch", cbPartialFetch.isChecked());
|
|
|
|
@ -1008,6 +1014,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
boolean notify = args.getBoolean("notify");
|
|
|
|
|
boolean browse = args.getBoolean("browse");
|
|
|
|
|
boolean auto_seen = args.getBoolean("auto_seen");
|
|
|
|
|
boolean leave_device = args.getBoolean("leave_device");
|
|
|
|
|
String interval = args.getString("interval");
|
|
|
|
|
boolean noop = args.getBoolean("noop");
|
|
|
|
|
boolean partial_fetch = args.getBoolean("partial_fetch");
|
|
|
|
@ -1115,6 +1122,8 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
return true;
|
|
|
|
|
if (!Objects.equals(account.auto_seen, auto_seen))
|
|
|
|
|
return true;
|
|
|
|
|
if (!Objects.equals(account.leave_on_device, leave_device))
|
|
|
|
|
return true;
|
|
|
|
|
if (!Objects.equals(account.poll_interval, poll_interval))
|
|
|
|
|
return true;
|
|
|
|
|
if (!Objects.equals(account.keep_alive_noop, noop))
|
|
|
|
@ -1262,6 +1271,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
account.notify = notify;
|
|
|
|
|
account.browse = browse;
|
|
|
|
|
account.auto_seen = auto_seen;
|
|
|
|
|
account.leave_on_device = leave_device;
|
|
|
|
|
|
|
|
|
|
if (account.poll_interval != poll_interval) {
|
|
|
|
|
account.keep_alive_ok = false;
|
|
|
|
@ -1636,6 +1646,7 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
cbPrimary.setChecked(account == null ? false : account.primary);
|
|
|
|
|
cbBrowse.setChecked(account == null ? true : account.browse);
|
|
|
|
|
cbAutoSeen.setChecked(account == null ? true : account.auto_seen);
|
|
|
|
|
cbLeaveDevice.setChecked(account == null ? true : account.leave_on_device);
|
|
|
|
|
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
|
|
|
|
|
cbNoop.setChecked(account == null ? true : account.keep_alive_noop);
|
|
|
|
|
cbPartialFetch.setChecked(account == null ? true : account.partial_fetch);
|
|
|
|
|