Small fix

This commit is contained in:
M66B 2022-04-24 09:30:17 +02:00
parent c8bbdaa008
commit b3e435f7cd
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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) {