From: Damyan Ivanov Date: Sun, 28 Apr 2019 18:09:09 +0000 (+0300) Subject: copy constructor for MobileLedgerProfile X-Git-Tag: v0.10.0~65 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=bffab241768ba54b1a5fdaa101cbf027c1c2ab98;p=mobile-ledger.git copy constructor for MobileLedgerProfile --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java index a75ac72a..4822a92a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java @@ -52,6 +52,18 @@ public final class MobileLedgerProfile { public MobileLedgerProfile(String uuid) { this.uuid = uuid; } + public MobileLedgerProfile(MobileLedgerProfile origin) { + uuid = origin.uuid; + name = origin.name; + permitPosting = origin.permitPosting; + preferredAccountsFilter = origin.preferredAccountsFilter; + url = origin.url; + authEnabled = origin.authEnabled; + authUserName = origin.authUserName; + authPassword = origin.authPassword; + themeId = origin.themeId; + orderNo = origin.orderNo; + } // loads all profiles into Data.profiles // returns the profile with the given UUID public static MobileLedgerProfile loadAllFromDB(String currentProfileUUID) {