From: Damyan Ivanov Date: Tue, 2 Mar 2021 16:57:24 +0000 (+0200) Subject: check if transaction is submittable after applying a template X-Git-Tag: v0.17.0~54 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=92846565ae94144ea1423be61c37e5a7b1a920fa;p=mobile-ledger.git check if transaction is submittable after applying a template --- 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 b22bcc14..d0b99f3d 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 @@ -18,6 +18,8 @@ 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; @@ -276,7 +278,7 @@ public class NewTransactionModel extends ViewModel { newItems.add(accRow); } - items.postValue(newItems); + new Handler(Looper.getMainLooper()).post(() -> setItems(newItems)); }); } private int extractIntFromMatches(MatchResult m, Integer group, Integer literal) {