|
|
@ -95,6 +95,7 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
private EditText etDomain;
|
|
|
|
private EditText etDomain;
|
|
|
|
private Button btnAutoConfig;
|
|
|
|
private Button btnAutoConfig;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnAuthorize;
|
|
|
|
private EditText etHost;
|
|
|
|
private EditText etHost;
|
|
|
|
private CheckBox cbStartTls;
|
|
|
|
private CheckBox cbStartTls;
|
|
|
|
private CheckBox cbInsecure;
|
|
|
|
private CheckBox cbInsecure;
|
|
|
@ -102,26 +103,22 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
private EditText etUser;
|
|
|
|
private EditText etUser;
|
|
|
|
private TextInputLayout tilPassword;
|
|
|
|
private TextInputLayout tilPassword;
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnAuthorize;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnAdvanced;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private TextView tvName;
|
|
|
|
private TextView tvName;
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etPrefix;
|
|
|
|
|
|
|
|
private Button btnColor;
|
|
|
|
private Button btnColor;
|
|
|
|
private View vwColor;
|
|
|
|
private View vwColor;
|
|
|
|
private ImageView ibColorDefault;
|
|
|
|
private ImageView ibColorDefault;
|
|
|
|
private CheckBox cbNotify;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnAdvanced;
|
|
|
|
private CheckBox cbSynchronize;
|
|
|
|
private CheckBox cbSynchronize;
|
|
|
|
private CheckBox cbPrimary;
|
|
|
|
private CheckBox cbPrimary;
|
|
|
|
|
|
|
|
private CheckBox cbNotify;
|
|
|
|
private CheckBox cbBrowse;
|
|
|
|
private CheckBox cbBrowse;
|
|
|
|
private EditText etInterval;
|
|
|
|
private EditText etInterval;
|
|
|
|
|
|
|
|
private EditText etPrefix;
|
|
|
|
|
|
|
|
|
|
|
|
private Button btnCheck;
|
|
|
|
private Button btnCheck;
|
|
|
|
private ProgressBar pbCheck;
|
|
|
|
private ProgressBar pbCheck;
|
|
|
|
|
|
|
|
|
|
|
|
private TextView tvIdle;
|
|
|
|
private TextView tvIdle;
|
|
|
|
|
|
|
|
|
|
|
|
private ArrayAdapter<EntityFolder> adapter;
|
|
|
|
private ArrayAdapter<EntityFolder> adapter;
|
|
|
@ -170,6 +167,7 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
etDomain = view.findViewById(R.id.etDomain);
|
|
|
|
etDomain = view.findViewById(R.id.etDomain);
|
|
|
|
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
|
|
|
|
btnAutoConfig = view.findViewById(R.id.btnAutoConfig);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnAuthorize = view.findViewById(R.id.btnAuthorize);
|
|
|
|
etHost = view.findViewById(R.id.etHost);
|
|
|
|
etHost = view.findViewById(R.id.etHost);
|
|
|
|
etPort = view.findViewById(R.id.etPort);
|
|
|
|
etPort = view.findViewById(R.id.etPort);
|
|
|
|
cbStartTls = view.findViewById(R.id.cbStartTls);
|
|
|
|
cbStartTls = view.findViewById(R.id.cbStartTls);
|
|
|
@ -177,22 +175,19 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
etUser = view.findViewById(R.id.etUser);
|
|
|
|
etUser = view.findViewById(R.id.etUser);
|
|
|
|
tilPassword = view.findViewById(R.id.tilPassword);
|
|
|
|
tilPassword = view.findViewById(R.id.tilPassword);
|
|
|
|
|
|
|
|
|
|
|
|
btnAuthorize = view.findViewById(R.id.btnAuthorize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnAdvanced = view.findViewById(R.id.btnAdvanced);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etName = view.findViewById(R.id.etName);
|
|
|
|
etName = view.findViewById(R.id.etName);
|
|
|
|
tvName = view.findViewById(R.id.tvName);
|
|
|
|
tvName = view.findViewById(R.id.tvName);
|
|
|
|
etPrefix = view.findViewById(R.id.etPrefix);
|
|
|
|
|
|
|
|
btnColor = view.findViewById(R.id.btnColor);
|
|
|
|
btnColor = view.findViewById(R.id.btnColor);
|
|
|
|
vwColor = view.findViewById(R.id.vwColor);
|
|
|
|
vwColor = view.findViewById(R.id.vwColor);
|
|
|
|
ibColorDefault = view.findViewById(R.id.ibColorDefault);
|
|
|
|
ibColorDefault = view.findViewById(R.id.ibColorDefault);
|
|
|
|
cbNotify = view.findViewById(R.id.cbNotify);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnAdvanced = view.findViewById(R.id.btnAdvanced);
|
|
|
|
cbSynchronize = view.findViewById(R.id.cbSynchronize);
|
|
|
|
cbSynchronize = view.findViewById(R.id.cbSynchronize);
|
|
|
|
cbPrimary = view.findViewById(R.id.cbPrimary);
|
|
|
|
cbPrimary = view.findViewById(R.id.cbPrimary);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
etPrefix = view.findViewById(R.id.etPrefix);
|
|
|
|
|
|
|
|
|
|
|
|
btnCheck = view.findViewById(R.id.btnCheck);
|
|
|
|
btnCheck = view.findViewById(R.id.btnCheck);
|
|
|
|
pbCheck = view.findViewById(R.id.pbCheck);
|
|
|
|
pbCheck = view.findViewById(R.id.pbCheck);
|
|
|
@ -259,6 +254,23 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
etDomain.addTextChangedListener(new TextWatcher() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onTextChanged(CharSequence text, int start, int before, int count) {
|
|
|
|
|
|
|
|
btnAutoConfig.setEnabled(text.length() > 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void afterTextChanged(Editable s) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnAutoConfig.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
|
|
btnAutoConfig.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btnAutoConfig.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
@ -271,8 +283,10 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
new SimpleTask<SRVRecord>() {
|
|
|
|
new SimpleTask<SRVRecord>() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected SRVRecord onLoad(Context context, Bundle args) throws Throwable {
|
|
|
|
protected SRVRecord onLoad(Context context, Bundle args) throws Throwable {
|
|
|
|
String domain = args.getString("domain");
|
|
|
|
String dns = "_imaps._tcp." + args.getString("domain");
|
|
|
|
Record[] records = new Lookup("_imaps._tcp." + domain, Type.SRV).run();
|
|
|
|
Log.i("Lookup dns=" + dns);
|
|
|
|
|
|
|
|
Record[] records = new Lookup(dns, Type.SRV).run();
|
|
|
|
|
|
|
|
Log.i("Found dns=" + (records == null ? -1 : records.length));
|
|
|
|
if (records != null)
|
|
|
|
if (records != null)
|
|
|
|
for (int i = 0; i < records.length; i++) {
|
|
|
|
for (int i = 0; i < records.length; i++) {
|
|
|
|
SRVRecord srv = (SRVRecord) records[i];
|
|
|
|
SRVRecord srv = (SRVRecord) records[i];
|
|
|
@ -330,6 +344,37 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vwColor.setBackgroundColor(color);
|
|
|
|
|
|
|
|
btnColor.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
|
|
|
int[] colors = getContext().getResources().getIntArray(R.array.colorPicker);
|
|
|
|
|
|
|
|
ColorPickerDialog colorPickerDialog = new ColorPickerDialog();
|
|
|
|
|
|
|
|
colorPickerDialog.initialize(R.string.title_account_color, colors, color, 4, colors.length);
|
|
|
|
|
|
|
|
colorPickerDialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onColorSelected(int color) {
|
|
|
|
|
|
|
|
setColor(color);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
colorPickerDialog.show(getFragmentManager(), "colorpicker");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
|
|
|
fragmentTransaction.hide(FragmentAccount.this);
|
|
|
|
|
|
|
|
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ibColorDefault.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
setColor(Color.TRANSPARENT);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
btnAuthorize.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btnAuthorize.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
@ -357,40 +402,16 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
new Handler().post(new Runnable() {
|
|
|
|
new Handler().post(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
((ScrollView) view).smoothScrollTo(0, tvName.getTop());
|
|
|
|
((ScrollView) view).smoothScrollTo(0, cbPrimary.getTop());
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vwColor.setBackgroundColor(color);
|
|
|
|
|
|
|
|
btnColor.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
|
|
|
int[] colors = getContext().getResources().getIntArray(R.array.colorPicker);
|
|
|
|
|
|
|
|
ColorPickerDialog colorPickerDialog = new ColorPickerDialog();
|
|
|
|
|
|
|
|
colorPickerDialog.initialize(R.string.title_account_color, colors, color, 4, colors.length);
|
|
|
|
|
|
|
|
colorPickerDialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onColorSelected(int color) {
|
|
|
|
|
|
|
|
setColor(color);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
colorPickerDialog.show(getFragmentManager(), "colorpicker");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
|
|
|
fragmentTransaction.hide(FragmentAccount.this);
|
|
|
|
|
|
|
|
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
ibColorDefault.setOnClickListener(new View.OnClickListener() {
|
|
|
|
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
setColor(Color.TRANSPARENT);
|
|
|
|
cbPrimary.setEnabled(checked);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -408,13 +429,6 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
cbPrimary.setEnabled(checked);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btnCheck.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btnCheck.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
@ -594,23 +608,24 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putLong("id", id);
|
|
|
|
args.putLong("id", id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
args.putInt("auth_type", authorized == null ? Helper.AUTH_TYPE_PASSWORD : provider.getAuthType());
|
|
|
|
args.putString("host", etHost.getText().toString());
|
|
|
|
args.putString("host", etHost.getText().toString());
|
|
|
|
args.putBoolean("starttls", cbStartTls.isChecked());
|
|
|
|
args.putBoolean("starttls", cbStartTls.isChecked());
|
|
|
|
args.putBoolean("insecure", cbInsecure.isChecked());
|
|
|
|
args.putBoolean("insecure", cbInsecure.isChecked());
|
|
|
|
args.putString("port", etPort.getText().toString());
|
|
|
|
args.putString("port", etPort.getText().toString());
|
|
|
|
args.putString("user", etUser.getText().toString());
|
|
|
|
args.putString("user", etUser.getText().toString());
|
|
|
|
args.putString("password", tilPassword.getEditText().getText().toString());
|
|
|
|
args.putString("password", tilPassword.getEditText().getText().toString());
|
|
|
|
args.putInt("auth_type", authorized == null ? Helper.AUTH_TYPE_PASSWORD : provider.getAuthType());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
args.putString("name", etName.getText().toString());
|
|
|
|
args.putString("name", etName.getText().toString());
|
|
|
|
args.putString("prefix", etPrefix.getText().toString());
|
|
|
|
|
|
|
|
args.putInt("color", color);
|
|
|
|
args.putInt("color", color);
|
|
|
|
args.putBoolean("notify", cbNotify.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
args.putBoolean("synchronize", cbSynchronize.isChecked());
|
|
|
|
args.putBoolean("synchronize", cbSynchronize.isChecked());
|
|
|
|
args.putBoolean("primary", cbPrimary.isChecked());
|
|
|
|
args.putBoolean("primary", cbPrimary.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.putString("prefix", etPrefix.getText().toString());
|
|
|
|
|
|
|
|
|
|
|
|
args.putSerializable("drafts", drafts);
|
|
|
|
args.putSerializable("drafts", drafts);
|
|
|
|
args.putSerializable("sent", sent);
|
|
|
|
args.putSerializable("sent", sent);
|
|
|
@ -622,23 +637,24 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected Void onLoad(Context context, Bundle args) throws Throwable {
|
|
|
|
protected Void onLoad(Context context, Bundle args) throws Throwable {
|
|
|
|
long id = args.getLong("id");
|
|
|
|
long id = args.getLong("id");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int auth_type = args.getInt("auth_type");
|
|
|
|
String host = args.getString("host");
|
|
|
|
String host = args.getString("host");
|
|
|
|
boolean starttls = args.getBoolean("starttls");
|
|
|
|
boolean starttls = args.getBoolean("starttls");
|
|
|
|
boolean insecure = args.getBoolean("insecure");
|
|
|
|
boolean insecure = args.getBoolean("insecure");
|
|
|
|
String port = args.getString("port");
|
|
|
|
String port = args.getString("port");
|
|
|
|
String user = args.getString("user");
|
|
|
|
String user = args.getString("user");
|
|
|
|
String password = args.getString("password");
|
|
|
|
String password = args.getString("password");
|
|
|
|
int auth_type = args.getInt("auth_type");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name = args.getString("name");
|
|
|
|
String name = args.getString("name");
|
|
|
|
String prefix = args.getString("prefix");
|
|
|
|
|
|
|
|
Integer color = args.getInt("color");
|
|
|
|
Integer color = args.getInt("color");
|
|
|
|
boolean notify = args.getBoolean("notify");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean synchronize = args.getBoolean("synchronize");
|
|
|
|
boolean synchronize = args.getBoolean("synchronize");
|
|
|
|
boolean primary = args.getBoolean("primary");
|
|
|
|
boolean primary = args.getBoolean("primary");
|
|
|
|
|
|
|
|
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");
|
|
|
|
|
|
|
|
String prefix = args.getString("prefix");
|
|
|
|
|
|
|
|
|
|
|
|
EntityFolder drafts = (EntityFolder) args.getSerializable("drafts");
|
|
|
|
EntityFolder drafts = (EntityFolder) args.getSerializable("drafts");
|
|
|
|
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
|
|
|
|
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
|
|
|
@ -659,10 +675,10 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
if (synchronize && drafts == null)
|
|
|
|
if (synchronize && drafts == null)
|
|
|
|
throw new Throwable(context.getString(R.string.title_no_drafts));
|
|
|
|
throw new Throwable(context.getString(R.string.title_no_drafts));
|
|
|
|
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(prefix))
|
|
|
|
|
|
|
|
prefix = null;
|
|
|
|
|
|
|
|
if (Color.TRANSPARENT == color)
|
|
|
|
if (Color.TRANSPARENT == color)
|
|
|
|
color = null;
|
|
|
|
color = null;
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(prefix))
|
|
|
|
|
|
|
|
prefix = null;
|
|
|
|
|
|
|
|
|
|
|
|
long now = new Date().getTime();
|
|
|
|
long now = new Date().getTime();
|
|
|
|
Character separator = null;
|
|
|
|
Character separator = null;
|
|
|
@ -713,23 +729,23 @@ public class FragmentAccount extends FragmentEx {
|
|
|
|
if (account == null)
|
|
|
|
if (account == null)
|
|
|
|
account = new EntityAccount();
|
|
|
|
account = new EntityAccount();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
account.auth_type = auth_type;
|
|
|
|
account.host = host;
|
|
|
|
account.host = host;
|
|
|
|
account.starttls = starttls;
|
|
|
|
account.starttls = starttls;
|
|
|
|
account.insecure = insecure;
|
|
|
|
account.insecure = insecure;
|
|
|
|
account.port = Integer.parseInt(port);
|
|
|
|
account.port = Integer.parseInt(port);
|
|
|
|
account.user = user;
|
|
|
|
account.user = user;
|
|
|
|
account.password = password;
|
|
|
|
account.password = password;
|
|
|
|
account.auth_type = auth_type;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
account.name = name;
|
|
|
|
account.name = name;
|
|
|
|
account.prefix = prefix;
|
|
|
|
|
|
|
|
account.color = color;
|
|
|
|
account.color = color;
|
|
|
|
account.notify = notify;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
account.synchronize = synchronize;
|
|
|
|
account.synchronize = synchronize;
|
|
|
|
account.primary = (account.synchronize && primary);
|
|
|
|
account.primary = (account.synchronize && primary);
|
|
|
|
|
|
|
|
account.notify = notify;
|
|
|
|
account.browse = browse;
|
|
|
|
account.browse = browse;
|
|
|
|
account.poll_interval = Integer.parseInt(interval);
|
|
|
|
account.poll_interval = Integer.parseInt(interval);
|
|
|
|
|
|
|
|
account.prefix = prefix;
|
|
|
|
|
|
|
|
|
|
|
|
if (!update)
|
|
|
|
if (!update)
|
|
|
|
account.created = now;
|
|
|
|
account.created = now;
|
|
|
|