- public List<LedgerTransaction> getTransactions(Context context) {
- if (transactions == null) {
- transactions = new ArrayList<>();
- reloadTransactions(context);
+ String filter = Data.accountFilter.getValue();
+ AsyncTask<String, Void, String> task = new UTT();
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, filter);
+ }
+ public static TransactionListItem getTransactionListItem(int position) {
+ if (Data.transactions == null) return null;
+ try(LockHolder lh = Data.transactions.lockForReading()) {
+ if (position >= Data.transactions.size()) return null;
+ return Data.transactions.get(position);