X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Factivity%2FNewTransactionModel.java;h=062495c1537a0a169fe7febc7015a44292b6529b;hp=00e44508a33d4ac0856aa39b3c2485c8dbcaf252;hb=f2f0413c454a2fd63decc60fcbc0f8ac80f6159f;hpb=6b66660baa2586d84c104bd3e5b201b224722c61 diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java index 00e44508..062495c1 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java @@ -59,7 +59,7 @@ public class NewTransactionModel extends ViewModel { profile -> showCurrency.postValue(profile.getShowCommodityByDefault()); private final AtomicInteger busyCounter = new AtomicInteger(0); private final MutableLiveData busyFlag = new MutableLiveData<>(false); - void observeBusyFlag(LifecycleOwner owner, Observer observer) { + void observeBusyFlag(@NonNull LifecycleOwner owner, Observer observer) { busyFlag.observe(owner, observer); } void observeDataProfile(LifecycleOwner activity) { @@ -204,6 +204,9 @@ public class NewTransactionModel extends ViewModel { int newValue = busyCounter.decrementAndGet(); if (newValue == 0) busyFlag.postValue(false); } + public boolean getBusyFlag() { + return busyFlag.getValue(); + } enum ItemType {generalData, transactionRow, bottomFiller} enum FocusedElement {Account, Comment, Amount}