]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java
more fall-outs after transition to surrogate IDs
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / new_transaction / NewTransactionModel.java
index 7333561c5b52f129a77fe0eefb03de50a2d2c002..fdcab48788b94f6336f41254298f92c02748e4c6 100644 (file)
@@ -461,15 +461,15 @@ public class NewTransactionModel extends ViewModel {
 
         return tr;
     }
-    void loadTransactionIntoModel(String profileUUID, int transactionId) {
+    void loadTransactionIntoModel(long profileId, int transactionId) {
         List<Item> 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)