]> git.ktnx.net Git - mobile-ledger.git/commitdiff
honour default currency profile setting
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 May 2021 17:19:28 +0000 (20:19 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 May 2021 17:19:28 +0000 (20:19 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java

index 1d0eedf58ae5e3ed1a2f84a8bc3d4b6fce75dd8d..f17f77b17b1c97c8e2e461779c751c95f1456f0b 100644 (file)
@@ -192,8 +192,10 @@ public class NewTransactionModel extends ViewModel {
         List<Item> 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);