From 3d7e4e0d757602b987ed95e756e5a3e6efe63283 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 20 Jun 2019 18:04:24 +0200 Subject: [PATCH] Check on account/identity error --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 5 ++++- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 4 +++- 2 files changed, 7 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 f3f3f9ed06..56e064b73c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -833,13 +833,16 @@ public class FragmentAccount extends FragmentBase { if (!Objects.equals(account.swipe_right, right == null ? null : right.id == null ? -1L : right.id)) return true; + if (account.error != null) + return true; + return false; } String accountRealm = (account == null ? null : account.realm); boolean check = (synchronize && (account == null || - !account.synchronize || + !account.synchronize || account.error != null || !host.equals(account.host) || Integer.parseInt(port) != account.port || !user.equals(account.user) || !password.equals(account.password) || !Objects.equals(realm, accountRealm) || diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 3f911fa1ad..24cad82e4c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -659,6 +659,8 @@ public class FragmentIdentity extends FragmentBase { return true; if (!Objects.equals(identity.store_sent, store_sent)) return true; + if (identity.error != null) + return true; return false; } @@ -666,7 +668,7 @@ public class FragmentIdentity extends FragmentBase { String identityRealm = (identity == null ? null : identity.realm); boolean check = (synchronize && (identity == null || - !identity.synchronize || + !identity.synchronize || identity.error != null || !host.equals(identity.host) || Integer.parseInt(port) != identity.port || !user.equals(identity.user) || !password.equals(identity.password) || !Objects.equals(realm, identityRealm) ||