From b3e435f7cd67e48597f8320d173b07da3ea4a1af Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 24 Apr 2022 09:30:17 +0200 Subject: [PATCH] Small fix --- app/src/main/java/eu/faircode/email/EntityAccount.java | 2 +- .../main/java/eu/faircode/email/TupleAccountNetworkState.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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) {