]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index 8add70b298080bb8fc7dc9338b5c031a03dae0f3..0b751b4c6d7df0c94174973ec7a2e449352c9dc9 100644 (file)
@@ -439,6 +439,10 @@ public class RetrieveTransactionsTask extends Thread {
                 list.add(acc);
             }
             throwIfCancelled();
+
+            Logger.warn("accounts",
+                    String.format(Locale.US, "Got %d accounts using protocol %s", list.size(),
+                            version.getDescription()));
         }
 
         return list;
@@ -466,9 +470,9 @@ public class RetrieveTransactionsTask extends Thread {
                 return retrieveTransactionListForVersion(ver);
             }
             catch (Exception e) {
-                Logger.debug("json",
-                        String.format(Locale.US, "Error during account list retrieval using API %s",
-                                ver.getDescription()));
+                Logger.debug("json", String.format(Locale.US,
+                        "Error during transaction list retrieval using API %s",
+                        ver.getDescription()), e);
             }
 
         }
@@ -522,9 +526,13 @@ public class RetrieveTransactionsTask extends Thread {
             }
 
             throwIfCancelled();
+
+            Logger.warn("transactions",
+                    String.format(Locale.US, "Got %d transactions using protocol %s", trList.size(),
+                            apiVersion.getDescription()));
         }
 
-        // json interface returns transactions if file order and the rest of the machinery
+        // json interface returns transactions in file order and the rest of the machinery
         // expects them in reverse chronological order
         Collections.sort(trList, (o1, o2) -> {
             int res = o2.getDate()
@@ -587,8 +595,8 @@ public class RetrieveTransactionsTask extends Thread {
             finish(new Result("Network error"));
         }
         catch (OperationCanceledException e) {
-            e.printStackTrace();
-            finish(new Result("Operation cancelled"));
+            Logger.debug("RTT", "Retrieval was cancelled", e);
+            finish(new Result(null));
         }
         catch (ApiNotSupportedException e) {
             e.printStackTrace();