]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
fu: DB support for comments
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index 5aebe219ffa6cb9650ce15afd30719b6ce2ae150..44e916c536b8aa4beb0c6b7060243d930c5fb941 100644 (file)
@@ -122,7 +122,6 @@ public class RetrieveTransactionsTask
         HashMap<String, Void> accountNames = new HashMap<>();
         HashMap<String, LedgerAccount> syntheticAccounts = new HashMap<>();
         LedgerAccount lastAccount = null, prevAccount = null;
-        boolean onlyStarred = Data.optShowOnlyStarred.get();
 
         HttpURLConnection http = NetworkUtil.prepareConnection(profile, "journal");
         http.setAllowUserInteraction(false);
@@ -218,8 +217,8 @@ public class RetrieveTransactionsTask
                                         }
                                         acc.setHasSubAccounts(true);
                                         acc.removeAmounts();    // filled below when amounts are parsed
-                                        if ((!onlyStarred || !acc.isHiddenByStar()) &&
-                                            acc.isVisible(accountList)) accountList.add(acc);
+                                        if (acc.isVisible(accountList))
+                                            accountList.add(acc);
                                         L(String.format("gap-filling with %s", aName));
                                         accountNames.put(aName, null);
                                         profile.storeAccount(db, acc);
@@ -227,8 +226,7 @@ public class RetrieveTransactionsTask
                                     }
                                 }
 
-                                if ((!onlyStarred || !lastAccount.isHiddenByStar()) &&
-                                    lastAccount.isVisible(accountList))
+                                if (lastAccount.isVisible(accountList))
                                     accountList.add(lastAccount);
                                 accountNames.put(acct_name, null);
 
@@ -373,7 +371,7 @@ public class RetrieveTransactionsTask
                                     if (currency == null) currency = "";
                                     amount = amount.replace(',', '.');
                                     transaction.addAccount(new LedgerTransactionAccount(acc_name,
-                                            Float.valueOf(amount), currency));
+                                            Float.valueOf(amount), currency, null));
                                     L(String.format(Locale.ENGLISH, "%d: %s = %s",
                                             transaction.getId(), acc_name, amount));
                                 }