]> git.ktnx.net Git - mobile-ledger.git/commitdiff
helper method for loading a currency by name
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 Apr 2020 20:30:07 +0000 (23:30 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 Apr 2020 20:30:07 +0000 (23:30 +0300)
app/src/main/java/net/ktnx/mobileledger/model/Currency.java

index a4854c05219c146608326b1acf8f2556f5aebd25..3cb70f8bd6cec7ea199a4d81f9bfdcf17828a4c2 100644 (file)
@@ -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;
     }