]> git.ktnx.net Git - mobile-ledger.git/commitdiff
drop TODO about nicer transaction submission progress (done) and move another to...
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 22 Dec 2019 07:25:52 +0000 (09:25 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 22 Dec 2019 07:25:52 +0000 (09:25 +0200)
app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java

index 5170b9337a362dbcafc55cd6e66360056521157a..847e8c2ff192566e6fca901b92d3ab8224f87a4c 100644 (file)
@@ -52,6 +52,12 @@ import java.util.regex.Pattern;
 import static android.os.SystemClock.sleep;
 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,
+ *       at which point the HTML form emulation can be dropped entirely
+ */
+
 public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void> {
     private final TaskCallback taskCallback;
     protected String error;
@@ -261,7 +267,8 @@ public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
                     if (!send_1_15_OK()) {
                         Logger.debug("network", "Version 1.5 request failed. Trying with 1.14");
                         if (!send_1_14_OK()) {
-                            Logger.debug("network", "Version 1.14 failed too. Trying HTML form emulation");
+                            Logger.debug("network",
+                                    "Version 1.14 failed too. Trying HTML form emulation");
                             legacySendOkWithRetry();
                         }
                         else {
@@ -298,8 +305,7 @@ public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
         while (!legacySendOK()) {
             tried++;
             if (tried >= 2)
-                throw new IOException(
-                        String.format("aborting after %d tries", tried));
+                throw new IOException(String.format("aborting after %d tries", tried));
             sleep(100);
         }
     }
index 24f7f8955c04fcd878486426c47aecfee24f1b30..d363174bb9b4ef0eb41aedbefe1d8863d9957e18 100644 (file)
@@ -40,10 +40,7 @@ import java.util.Objects;
 import static net.ktnx.mobileledger.utils.Logger.debug;
 
 /*
- * TODO: nicer progress while transaction is submitted
  * TODO: reports
- * TODO: get rid of the custom session/cookie and auth code?
- *         (the last problem with the POST was the missing content-length header)
  *  */
 
 public class NewTransactionActivity extends ProfileThemedActivity implements TaskCallback,