From: Damyan Ivanov Date: Sun, 5 Apr 2020 20:30:07 +0000 (+0300) Subject: helper method for loading a currency by name X-Git-Tag: v0.12.0~63 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=0547f9d321932c2fa227eedd93eb4ba4f089706e;p=mobile-ledger.git helper method for loading a currency by name --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Currency.java b/app/src/main/java/net/ktnx/mobileledger/model/Currency.java index a4854c05..3cb70f8b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Currency.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Currency.java @@ -79,6 +79,10 @@ public class Currency { this.position = position; this.hasGap = hasGap; } + public static Currency loadByName(String name) { + MobileLedgerProfile profile = Data.profile.getValue(); + return profile.loadCurrencyByName(name); + } public int getId() { return id; }