From: Damyan Ivanov Date: Thu, 6 May 2021 17:19:28 +0000 (+0300) Subject: honour default currency profile setting X-Git-Tag: v0.19.0~28 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=3173a61c334646acf7cdd776b1001243dddd1baa;p=mobile-ledger.git honour default currency profile setting --- 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);