]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java
reset the submittable flag when resetting model state
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / new_transaction / NewTransactionModel.java
index d1db37b2c5f242ec8bb424537f94e75e21ee9276..249bdd3c6223158b141d3db574e17150a91cc3f6 100644 (file)
@@ -175,6 +175,8 @@ public class NewTransactionModel extends ViewModel {
         list.add(new TransactionHead(""));
         list.add(new TransactionAccount(""));
         list.add(new TransactionAccount(""));
+        noteFocusChanged(0, FocusedElement.Description);
+        isSubmittable.setValue(false);
         setItemsWithoutSubmittableChecks(list);
     }
     boolean accountsInInitialState() {
@@ -1158,6 +1160,9 @@ public class NewTransactionModel extends ViewModel {
             if (!TextUtils.isEmpty(comment))
                 b.append(String.format(" /%s/", comment));
 
+            if (isLast)
+                b.append(" last");
+
             return b.toString();
         }
         public boolean equalContents(TransactionAccount other) {