]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedLedgerTransaction.java
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / json / v1_15 / ParsedLedgerTransaction.java
index 8b1fab78d4eea93c744bf87bf01600856d622666..bc1950badca0ff381f701c0cb511fe3d36da7da4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2020 Damyan Ivanov.
+ * Copyright © 2021 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -46,7 +46,7 @@ public class ParsedLedgerTransaction implements net.ktnx.mobileledger.json.Parse
     }
     public static ParsedLedgerTransaction fromLedgerTransaction(LedgerTransaction tr) {
         ParsedLedgerTransaction result = new ParsedLedgerTransaction();
-        result.setTcomment(tr.getComment());
+        result.setTcomment(Misc.nullIsEmpty(tr.getComment()));
         result.setTprecedingcomment("");
 
         ArrayList<ParsedPosting> postings = new ArrayList<>();
@@ -153,6 +153,8 @@ public class ParsedLedgerTransaction implements net.ktnx.mobileledger.json.Parse
                 tr.addAccount(p.asLedgerAccount());
             }
         }
+
+        tr.markDataAsLoaded();
         return tr;
     }
 }