- public static LedgerTransaction getTransaction(int position) {
- List<LedgerTransaction> transactions = Data.transactions.get();
- if (position >= transactions.size()) return null;
+ public static TransactionListItem getTransactionListItem(int position) {
+ List<TransactionListItem> transactions = Data.transactions.get();
+ if (transactions == null) return null;
+ if (position >= transactions.size() + 1) return null;
+ if (position == transactions.size()) return new TransactionListItem();