]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
put account expansion bracket after the name, fix rotation animation
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index 47154b0b8744ca66302172db2380a3a337525e46..dfb1f74548a891e04a6c802c26b376be356aef0d 100644 (file)
@@ -169,11 +169,11 @@ public class RetrieveTransactionsTask
                                     acct_name = acct_name.replace("\"", "");
                                     L(String.format("found account: %s", acct_name));
 
-                                    lastAccount = profile.loadAccount(acct_name);
+                                    lastAccount = profile.tryLoadAccount(db, acct_name);
                                     if (lastAccount == null) {
                                         lastAccount = new LedgerAccount(acct_name);
-                                        profile.storeAccount(db, lastAccount);
                                     }
+                                    profile.storeAccount(db, lastAccount);
 
                                     // make sure the parent account(s) are present,
                                     // synthesising them if necessary
@@ -189,8 +189,8 @@ public class RetrieveTransactionsTask
                                         while (!toAppend.isEmpty()) {
                                             String aName = toAppend.pop();
                                             LedgerAccount acc = new LedgerAccount(aName);
-                                            acc.setHidden(lastAccount.isHidden());
-                                            if (!onlyStarred || !acc.isHidden())
+                                            acc.setHiddenByStar(lastAccount.isHiddenByStar());
+                                            if (!onlyStarred || !acc.isHiddenByStar())
                                                 accountList.add(acc);
                                             L(String.format("gap-filling with %s", aName));
                                             accountNames.put(aName, null);
@@ -198,7 +198,7 @@ public class RetrieveTransactionsTask
                                         }
                                     }
 
-                                    if (!onlyStarred || !lastAccount.isHidden())
+                                    if (!onlyStarred || !lastAccount.isHiddenByStar())
                                         accountList.add(lastAccount);
                                     accountNames.put(acct_name, null);