From 3173a61c334646acf7cdd776b1001243dddd1baa Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 6 May 2021 20:19:28 +0300 Subject: [PATCH] honour default currency profile setting --- .../ui/new_transaction/NewTransactionModel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 1d0eedf5..f17f77b1 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 @@ -192,8 +192,10 @@ public class NewTransactionModel extends ViewModel { List list = new ArrayList<>(); Item.resetIdDispenser(); list.add(new TransactionHead("")); - list.add(new TransactionAccount("")); - list.add(new TransactionAccount("")); + final String defaultCurrency = Objects.requireNonNull(Data.getProfile()) + .getDefaultCommodity(); + list.add(new TransactionAccount("", defaultCurrency)); + list.add(new TransactionAccount("", defaultCurrency)); noteFocusChanged(0, FocusedElement.Description); renumberItems(); isSubmittable.setValue(false); -- 2.39.5