From 0547f9d321932c2fa227eedd93eb4ba4f089706e Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 5 Apr 2020 23:30:07 +0300 Subject: [PATCH] helper method for loading a currency by name --- app/src/main/java/net/ktnx/mobileledger/model/Currency.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.5