]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
missing not-null annotation
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index 2ff41c3f7ac894e420942cea6b268934535da713..3dd291ec29db9cbebeb9401f2416297d0d6a5045 100644 (file)
@@ -57,7 +57,7 @@ import java.util.regex.Pattern;
 
 public class RetrieveTransactionsTask
         extends AsyncTask<Void, RetrieveTransactionsTask.Progress, String> {
-    private static final int MATCHING_TRANSACTIONS_LIMIT = 50;
+    private static final int MATCHING_TRANSACTIONS_LIMIT = 150;
     private static final Pattern reComment = Pattern.compile("^\\s*;");
     private static final Pattern reTransactionStart = Pattern.compile("<tr class=\"title\" " +
                                                                       "id=\"transaction-(\\d+)\"><td class=\"date\"[^\"]*>([\\d.-]+)</td>");
@@ -584,12 +584,11 @@ public class RetrieveTransactionsTask
         return true;
     }
 
-    ;
     @SuppressLint("DefaultLocale")
     @Override
     protected String doInBackground(Void... params) {
         MobileLedgerProfile profile = Data.profile.get();
-        Data.backgroundTaskCount.incrementAndGet();
+        Data.backgroundTaskStarted();
         try {
             if (!retrieveAccountList(profile) || !retrieveTransactionList(profile))
                 return retrieveTransactionListLegacy(profile);
@@ -616,7 +615,7 @@ public class RetrieveTransactionsTask
             return "Operation cancelled";
         }
         finally {
-            Data.backgroundTaskCount.decrementAndGet();
+            Data.backgroundTaskFinished();
         }
     }
     private MainActivity getContext() {