- public static void scheduleTransactionListReload(Activity act) {
- boolean hasFilter =
- act.findViewById(R.id.transaction_list_account_name_filter).getVisibility() ==
- View.VISIBLE;
- String accFilter = hasFilter ? String.valueOf(
- ((AutoCompleteTextView) act.findViewById(R.id.transaction_filter_account_name))
- .getText()) : null;
- updating.set(true);
- AsyncTask<String, Void, List<LedgerTransaction>> task = new UTT();
- task.execute(accFilter);
- }
- public static LedgerTransaction getTransaction(int position) {
- List<LedgerTransaction> transactions = Data.transactions.get();
- if (position >= transactions.size()) return null;
- return transactions.get(position);
+ public static void scheduleTransactionListReload() {
+ if (Data.profile.getValue() == null) return;
+
+ String filter = Data.accountFilter.getValue();
+ AsyncTask<String, Void, String> task = new UTT();
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, filter);