From: Damyan Ivanov Date: Wed, 23 Dec 2020 20:53:01 +0000 (+0000) Subject: hew transaction entry: honour default currency setting X-Git-Tag: v0.16.0~21 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=04f46449ebd9176a5d6c390befb11599fa032f5f;p=mobile-ledger.git hew transaction entry: honour default currency setting --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java index 62f0de49..5596d574 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java @@ -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);