import net.ktnx.mobileledger.model.LedgerAccount;
import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
import net.ktnx.mobileledger.model.LedgerAccount;
import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
private static final int MATCHING_TRANSACTIONS_LIMIT = 150;
private static final Pattern reComment = Pattern.compile("^\\s*;");
private static final Pattern reTransactionStart = Pattern.compile(
private static final int MATCHING_TRANSACTIONS_LIMIT = 150;
private static final Pattern reComment = Pattern.compile("^\\s*;");
private static final Pattern reTransactionStart = Pattern.compile(
Pattern.compile("/register\\?q=inacct%3A([a-zA-Z0-9%]+)\"");
private final Pattern reAccountValue = Pattern.compile(
"<span class=\"[^\"]*\\bamount\\b[^\"]*\">\\s*([-+]?[\\d.,]+)(?:\\s+(\\S+))?</span>");
Pattern.compile("/register\\?q=inacct%3A([a-zA-Z0-9%]+)\"");
private final Pattern reAccountValue = Pattern.compile(
"<span class=\"[^\"]*\\bamount\\b[^\"]*\">\\s*([-+]?[\\d.,]+)(?:\\s+(\\S+))?</span>");
- @Override
- protected void onProgressUpdate(Progress... values) {
- super.onProgressUpdate(values);
- Data.backgroundTaskProgress.postValue(values[0]);
+ private void publishProgress(Progress progress) {
+ Data.backgroundTaskProgress.postValue(progress);
Progress progress = new Progress();
progress.setState(ProgressState.FINISHED);
progress.setError(result.error);
Progress progress = new Progress();
progress.setState(ProgressState.FINISHED);
progress.setError(result.error);
}
private void retrieveTransactionListLegacy(List<LedgerAccount> accounts,
List<LedgerTransaction> transactions)
}
private void retrieveTransactionListLegacy(List<LedgerAccount> accounts,
List<LedgerTransaction> transactions)
Data.backgroundTaskStarted();
List<LedgerAccount> accounts;
List<LedgerTransaction> transactions;
Data.backgroundTaskStarted();
List<LedgerAccount> accounts;
List<LedgerTransaction> transactions;
new AccountAndTransactionListSaver(accounts, transactions).start();
Data.lastUpdateDate.postValue(new Date());
new AccountAndTransactionListSaver(accounts, transactions).start();
Data.lastUpdateDate.postValue(new Date());