From 62709762d7004f2db3ff20528c5e76fcad233144 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 4 Mar 2021 23:25:37 +0200 Subject: [PATCH] debug++ --- .../ui/new_transaction/NewTransactionModel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java index 5ad014f2..2c7c94fe 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java @@ -93,7 +93,6 @@ public class NewTransactionModel extends ViewModel { setItemsWithoutSubmittableChecks(newList); } private void setItemsWithoutSubmittableChecks(@NonNull List list) { - Logger.debug("new-trans", "model: Setting new item list"); final int cnt = list.size(); for (int i = 1; i < cnt - 1; i++) { final TransactionAccount item = list.get(i) @@ -112,6 +111,8 @@ public class NewTransactionModel extends ViewModel { list.set(cnt - 1, replacement); } + if (BuildConfig.DEBUG) + dumpItemList("Before setValue()", list); items.setValue(list); } private List copyList() { @@ -627,8 +628,8 @@ public class NewTransactionModel extends ViewModel { if (Misc.equalStrings(acc.getCurrency(), balCurrency)) { if (BuildConfig.DEBUG) Logger.debug("submittable", - String.format("Resetting hint of '%s' [%s]", - Misc.nullIsEmpty(acc.getAccountName()), + String.format(Locale.US, "Resetting hint of %d:'%s' [%s]", + i, Misc.nullIsEmpty(acc.getAccountName()), balCurrency)); // skip if the amount is set, in which case the hint is not // important/visible @@ -807,7 +808,6 @@ public class NewTransactionModel extends ViewModel { listChanged = true; } - Logger.debug("submittable", submittable ? "YES" : "NO"); isSubmittable.setValue(submittable); -- 2.39.5