X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fasync%2FSendTransactionTask.java;h=0e700cca9a510be8e210fafccbe548b88c2a427a;hp=79a58173f10e502d11dfbd752fcfdef355aeb4b3;hb=HEAD;hpb=2692a4d29cf595d6b171e018768d891d8481bf92 diff --git a/app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java b/app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java index 79a58173..0e700cca 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java @@ -1,5 +1,5 @@ /* - * Copyright © 2021 Damyan Ivanov. + * Copyright © 2023 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -17,6 +17,8 @@ package net.ktnx.mobileledger.async; +import static net.ktnx.mobileledger.utils.Logger.debug; + import android.util.Log; import net.ktnx.mobileledger.db.Profile; @@ -45,8 +47,6 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static net.ktnx.mobileledger.utils.Logger.debug; - /* TODO: get rid of the custom session/cookie and auth code? * (the last problem with the POST was the missing content-length header) * This will resolve itself when hledger-web 1.14+ is released with Debian/stable, @@ -275,6 +275,7 @@ public class SendTransactionTask extends Thread { case v1_14: case v1_15: case v1_19_1: + case v1_23: sendOK(profileApiVersion); break; default: @@ -286,9 +287,7 @@ public class SendTransactionTask extends Thread { error = e.getMessage(); } - Misc.onMainThread(()->{ - taskCallback.onTransactionSaveDone(error, transaction); - }); + Misc.onMainThread(() -> taskCallback.onTransactionSaveDone(error, transaction)); } private void legacySendOkWithRetry() throws IOException { int tried = 0;