X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Fnew_transaction%2FNewTransactionModel.java;h=fdcab48788b94f6336f41254298f92c02748e4c6;hb=aaad14b69d71f774706ad9bff4c6857bbc47c76e;hp=7333561c5b52f129a77fe0eefb03de50a2d2c002;hpb=38a70bbc9effabacaadd63b6fc7eba81592e0c5d;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java index 7333561c..fdcab487 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java @@ -461,15 +461,15 @@ public class NewTransactionModel extends ViewModel { return tr; } - void loadTransactionIntoModel(String profileUUID, int transactionId) { + void loadTransactionIntoModel(long profileId, int transactionId) { List newList = new ArrayList<>(); Item.resetIdDispenser(); LedgerTransaction tr; - MobileLedgerProfile profile = Data.getProfile(profileUUID); + MobileLedgerProfile profile = Data.getProfile(profileId); if (profile == null) throw new RuntimeException(String.format( "Unable to find profile %s, which is supposed to contain transaction %d", - profileUUID, transactionId)); + profileId, transactionId)); tr = profile.loadTransaction(transactionId); TransactionHead head = new TransactionHead(tr.getDescription()); @@ -1031,7 +1031,7 @@ public class NewTransactionModel extends ViewModel { return ItemType.generalData; } public LedgerTransaction asLedgerTransaction() { - return new LedgerTransaction(null, date, description, Data.getProfile()); + return new LedgerTransaction(0, date, description, Data.getProfile()); } public boolean equalContents(TransactionHead other) { if (other == null)