diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index 31ab77e7e7..0d5d8ea656 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -388,7 +388,7 @@ public class EntityAccount extends EntityOrder implements Serializable { account.ignore_size = json.optBoolean("ignore_size", false); account.use_date = json.optBoolean("use_date", false); account.use_received = json.optBoolean("use_received", false); - account.conditions = json.optString("conditions"); + account.conditions = json.optString("conditions", null); return account; } diff --git a/app/src/main/java/eu/faircode/email/TupleAccountNetworkState.java b/app/src/main/java/eu/faircode/email/TupleAccountNetworkState.java index af9532b400..2ce6a6b6fd 100644 --- a/app/src/main/java/eu/faircode/email/TupleAccountNetworkState.java +++ b/app/src/main/java/eu/faircode/email/TupleAccountNetworkState.java @@ -20,6 +20,7 @@ package eu.faircode.email; */ import android.os.Bundle; +import android.text.TextUtils; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -49,7 +50,7 @@ public class TupleAccountNetworkState { this.accountState = accountState; this.jconditions = new JSONObject(); - if (this.accountState.conditions != null) + if (!TextUtils.isEmpty(this.accountState.conditions)) try { jconditions = new JSONObject(this.accountState.conditions); } catch (Throwable ex) {