Allow saving accounts/identities without password when not synchronizing

pull/146/head
M66B 6 years ago
parent 7c9944348f
commit 3533cec6b2

@ -640,7 +640,7 @@ public class FragmentAccount extends FragmentEx {
port = (starttls ? "143" : "993");
if (TextUtils.isEmpty(user))
throw new Throwable(getContext().getString(R.string.title_no_user));
if (TextUtils.isEmpty(password) && !insecure)
if (synchronize && TextUtils.isEmpty(password) && !insecure)
throw new Throwable(getContext().getString(R.string.title_no_password));
if (TextUtils.isEmpty(interval))
interval = "19";

@ -421,7 +421,7 @@ public class FragmentIdentity extends FragmentEx {
port = (starttls ? "587" : "465");
if (TextUtils.isEmpty(user))
throw new IllegalArgumentException(getContext().getString(R.string.title_no_user));
if (TextUtils.isEmpty(password) && !insecure)
if (synchronize && TextUtils.isEmpty(password) && !insecure)
throw new IllegalArgumentException(getContext().getString(R.string.title_no_password));
email = email.toLowerCase();

Loading…
Cancel
Save