X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fjson%2FAccountListParser.java;h=baeeb2eab58528cc6f722639a6b43299411c97c9;hb=af787b1e7a2c3b4052650d55f69a3ff1f0be5b3e;hp=783142e5df0985de21994c24e80ecf140afa66c8;hpb=a87079ed41bdc3ad89fe8bd15dfba10e37b29b76;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/json/AccountListParser.java b/app/src/main/java/net/ktnx/mobileledger/json/AccountListParser.java index 783142e5..baeeb2ea 100644 --- a/app/src/main/java/net/ktnx/mobileledger/json/AccountListParser.java +++ b/app/src/main/java/net/ktnx/mobileledger/json/AccountListParser.java @@ -20,7 +20,6 @@ package net.ktnx.mobileledger.json; import com.fasterxml.jackson.databind.MappingIterator; import net.ktnx.mobileledger.async.RetrieveTransactionsTask; -import net.ktnx.mobileledger.async.SendTransactionTask; import net.ktnx.mobileledger.model.LedgerAccount; import java.io.IOException; @@ -31,8 +30,8 @@ import static net.ktnx.mobileledger.utils.Logger.debug; abstract public class AccountListParser { protected MappingIterator iterator; - public static AccountListParser forApiVersion(SendTransactionTask.API version, - InputStream input) throws IOException { + public static AccountListParser forApiVersion(API version, InputStream input) + throws IOException { switch (version) { case v1_14: return new net.ktnx.mobileledger.json.v1_14.AccountListParser(input); @@ -40,12 +39,14 @@ abstract public class AccountListParser { return new net.ktnx.mobileledger.json.v1_15.AccountListParser(input); case v1_19_1: return new net.ktnx.mobileledger.json.v1_19_1.AccountListParser(input); + case v1_23: + return new net.ktnx.mobileledger.json.v1_23.AccountListParser(input); default: throw new RuntimeException("Unsupported version " + version.toString()); } } - public abstract SendTransactionTask.API getApiVersion(); + public abstract API getApiVersion(); public LedgerAccount nextAccount(RetrieveTransactionsTask task, HashMap map) { if (!iterator.hasNext())