From 3a8256de103e052c6cf38506fc59f24c48955205 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 11 Nov 2018 07:20:32 +0000 Subject: [PATCH] Check when synchronize is enabled only --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 4 ++-- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 74cb772a4b..afaa58ca70 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -673,8 +673,8 @@ public class FragmentAccount extends FragmentEx { DB db = DB.getInstance(context); EntityAccount account = db.account().getAccount(id); - boolean check = (account == null || (synchronize && - (!host.equals(account.host) || Integer.parseInt(port) != account.port) || + boolean check = (synchronize && (account == null || + !host.equals(account.host) || Integer.parseInt(port) != account.port || !user.equals(account.user) || !password.equals(account.password))); // Check IMAP server diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index cae792de44..b5c1162bb2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -412,8 +412,8 @@ public class FragmentIdentity extends FragmentEx { DB db = DB.getInstance(context); EntityIdentity identity = db.identity().getIdentity(id); - boolean check = (identity == null || (synchronize && - (!host.equals(identity.host) || Integer.parseInt(port) != identity.port) || + boolean check = (synchronize && (identity == null || + !host.equals(identity.host) || Integer.parseInt(port) != identity.port || !user.equals(identity.user) || !password.equals(identity.password))); // Check SMTP server