]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java
move previous transaction lookup progress bar to the fragment
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / NewTransactionModel.java
index 00e44508a33d4ac0856aa39b3c2485c8dbcaf252..062495c1537a0a169fe7febc7015a44292b6529b 100644 (file)
@@ -59,7 +59,7 @@ public class NewTransactionModel extends ViewModel {
             profile -> showCurrency.postValue(profile.getShowCommodityByDefault());
     private final AtomicInteger busyCounter = new AtomicInteger(0);
     private final MutableLiveData<Boolean> busyFlag = new MutableLiveData<>(false);
-    void observeBusyFlag(LifecycleOwner owner, Observer<? super Boolean> observer) {
+    void observeBusyFlag(@NonNull LifecycleOwner owner, Observer<? super Boolean> 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}