mirror of https://github.com/M66B/FairEmail.git
Fixes, improvements
This commit is contained in:
parent
a31de29558
commit
698cba4e57
|
@ -730,7 +730,8 @@ public class FragmentAccount extends FragmentEx {
|
||||||
account.primary = (account.synchronize && primary);
|
account.primary = (account.synchronize && primary);
|
||||||
account.poll_interval = Integer.parseInt(interval);
|
account.poll_interval = Integer.parseInt(interval);
|
||||||
|
|
||||||
account.created = now;
|
if (!update)
|
||||||
|
account.created = now;
|
||||||
if (synchronize)
|
if (synchronize)
|
||||||
account.last_connected = now;
|
account.last_connected = now;
|
||||||
|
|
||||||
|
@ -935,7 +936,7 @@ public class FragmentAccount extends FragmentEx {
|
||||||
|
|
||||||
new SimpleTask<EntityAccount>() {
|
new SimpleTask<EntityAccount>() {
|
||||||
@Override
|
@Override
|
||||||
protected EntityAccount onLoad(Context context, Bundle args) throws Throwable {
|
protected EntityAccount onLoad(Context context, Bundle args) {
|
||||||
long id = args.getLong("id");
|
long id = args.getLong("id");
|
||||||
return DB.getInstance(context).account().getAccount(id);
|
return DB.getInstance(context).account().getAccount(id);
|
||||||
}
|
}
|
||||||
|
@ -973,6 +974,9 @@ public class FragmentAccount extends FragmentEx {
|
||||||
etPort.setText(Long.toString(account.port));
|
etPort.setText(Long.toString(account.port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cbStartTls.setChecked(account == null ? false : account.starttls);
|
||||||
|
cbInsecure.setChecked(account == null ? false : account.insecure);
|
||||||
|
|
||||||
authorized = (account != null && account.auth_type != Helper.AUTH_TYPE_PASSWORD ? account.password : null);
|
authorized = (account != null && account.auth_type != Helper.AUTH_TYPE_PASSWORD ? account.password : null);
|
||||||
etUser.setText(account == null ? null : account.user);
|
etUser.setText(account == null ? null : account.user);
|
||||||
tilPassword.getEditText().setText(account == null ? null : account.password);
|
tilPassword.getEditText().setText(account == null ? null : account.password);
|
||||||
|
|
|
@ -603,14 +603,12 @@ public class FragmentIdentity extends FragmentEx {
|
||||||
public void onActivityCreated(@Nullable final Bundle savedInstanceState) {
|
public void onActivityCreated(@Nullable final Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
final DB db = DB.getInstance(getContext());
|
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putLong("id", id);
|
args.putLong("id", id);
|
||||||
|
|
||||||
new SimpleTask<EntityIdentity>() {
|
new SimpleTask<EntityIdentity>() {
|
||||||
@Override
|
@Override
|
||||||
protected EntityIdentity onLoad(Context context, Bundle args) throws Throwable {
|
protected EntityIdentity onLoad(Context context, Bundle args) {
|
||||||
long id = args.getLong("id");
|
long id = args.getLong("id");
|
||||||
return DB.getInstance(context).identity().getIdentity(id);
|
return DB.getInstance(context).identity().getIdentity(id);
|
||||||
}
|
}
|
||||||
|
@ -623,6 +621,7 @@ public class FragmentIdentity extends FragmentEx {
|
||||||
etReplyTo.setText(identity == null ? null : identity.replyto);
|
etReplyTo.setText(identity == null ? null : identity.replyto);
|
||||||
etHost.setText(identity == null ? null : identity.host);
|
etHost.setText(identity == null ? null : identity.host);
|
||||||
cbStartTls.setChecked(identity == null ? false : identity.starttls);
|
cbStartTls.setChecked(identity == null ? false : identity.starttls);
|
||||||
|
cbInsecure.setChecked(identity == null ? false : identity.insecure);
|
||||||
etPort.setText(identity == null ? null : Long.toString(identity.port));
|
etPort.setText(identity == null ? null : Long.toString(identity.port));
|
||||||
etUser.setText(identity == null ? null : identity.user);
|
etUser.setText(identity == null ? null : identity.user);
|
||||||
tilPassword.getEditText().setText(identity == null ? null : identity.password);
|
tilPassword.getEditText().setText(identity == null ? null : identity.password);
|
||||||
|
@ -674,7 +673,7 @@ public class FragmentIdentity extends FragmentEx {
|
||||||
|
|
||||||
new SimpleTask<List<EntityAccount>>() {
|
new SimpleTask<List<EntityAccount>>() {
|
||||||
@Override
|
@Override
|
||||||
protected List<EntityAccount> onLoad(Context context, Bundle args) throws Throwable {
|
protected List<EntityAccount> onLoad(Context context, Bundle args) {
|
||||||
return DB.getInstance(context).account().getAccounts();
|
return DB.getInstance(context).account().getAccounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue