]> git.ktnx.net Git - mobile-ledger.git/commitdiff
check if transaction is submittable after applying a template
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 2 Mar 2021 16:57:24 +0000 (18:57 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 2 Mar 2021 16:57:24 +0000 (18:57 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java

index b22bcc14d390683055e64e9dccb4fdbe12d02507..d0b99f3d558c4106238b5747dd1e94fecc826995 100644 (file)
@@ -18,6 +18,8 @@
 package net.ktnx.mobileledger.ui.new_transaction;
 
 import android.annotation.SuppressLint;
 package net.ktnx.mobileledger.ui.new_transaction;
 
 import android.annotation.SuppressLint;
+import android.os.Handler;
+import android.os.Looper;
 import android.text.TextUtils;
 
 import androidx.annotation.NonNull;
 import android.text.TextUtils;
 
 import androidx.annotation.NonNull;
@@ -276,7 +278,7 @@ public class NewTransactionModel extends ViewModel {
                   newItems.add(accRow);
               }
 
                   newItems.add(accRow);
               }
 
-              items.postValue(newItems);
+              new Handler(Looper.getMainLooper()).post(() -> setItems(newItems));
           });
     }
     private int extractIntFromMatches(MatchResult m, Integer group, Integer literal) {
           });
     }
     private int extractIntFromMatches(MatchResult m, Integer group, Integer literal) {