profile -> showCurrency.postValue(profile.getShowCommodityByDefault());
private final AtomicInteger busyCounter = new AtomicInteger(0);
private final MutableLiveData<Boolean> busyFlag = new MutableLiveData<>(false);
+ final MutableLiveData<Boolean> showComments = new MutableLiveData<>(false);
+ void observeShowComments(LifecycleOwner owner, Observer<? super Boolean> observer) {
+ showComments.observe(owner, observer);
+ }
void observeBusyFlag(@NonNull LifecycleOwner owner, Observer<? super Boolean> observer) {
busyFlag.observe(owner, observer);
}
public boolean getBusyFlag() {
return busyFlag.getValue();
}
+ public void toggleShowComments() {
+ showComments.setValue(!showComments.getValue());
+ }
enum ItemType {generalData, transactionRow, bottomFiller}
enum FocusedElement {Account, Comment, Amount}