From 3533cec6b25436567e47871642b9d9539884db9b Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 18 Nov 2018 08:32:10 +0100 Subject: [PATCH] Allow saving accounts/identities without password when not synchronizing --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 2 +- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 2705d9a2c4..10a477c2f0 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -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"; diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 2d301a8c2e..bb497468f2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -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();