+ /*
+ Slots contain lists of items, all using the same currency, including the possible
+ item with no account/amount that is used to help balancing the transaction
+
+ There is one slot per currency
+ */
+ private final HashMap<String, List<Item>> slots = new HashMap<>();
+ private int checkHoldCounter = 0;
+ private Observer<MobileLedgerProfile> profileObserver = profile ->showCurrency.postValue(profile.getShowCommodityByDefault());
+ public void observeDataProfile(LifecycleOwner activity) {
+ Data.profile.observe(activity, profileObserver);
+ }
+ void holdSubmittableChecks() {
+ checkHoldCounter++;
+ }
+ void releaseSubmittableChecks() {
+ if (checkHoldCounter == 0)
+ throw new RuntimeException("Asymmetrical call to releaseSubmittableChecks");
+ checkHoldCounter--;
+ }
+ boolean getSimulateSave() {