]> git.ktnx.net Git - mobile-ledger.git/commitdiff
hew transaction entry: honour default currency setting
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 23 Dec 2020 20:53:01 +0000 (20:53 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 23 Dec 2020 20:55:12 +0000 (20:55 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java

index 62f0de49677df85c70b58890907bb084994713b7..5596d5746c072201361fbb5762a354a34c5ac7e1 100644 (file)
@@ -378,6 +378,9 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
         showCurrencyObserver = showCurrency -> {
             if (showCurrency) {
                 tvCurrency.setVisibility(View.VISIBLE);
+                String defaultCommodity = mProfile.getDefaultCommodity();
+                item.setCurrency(
+                        (defaultCommodity == null) ? null : Currency.loadByName(defaultCommodity));
             }
             else {
                 tvCurrency.setVisibility(View.GONE);