import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.MutableLiveData;
+import androidx.lifecycle.Observer;
import net.ktnx.mobileledger.App;
import net.ktnx.mobileledger.async.RetrieveTransactionsTask;
import java.util.Date;
import java.util.List;
import java.util.Locale;
+import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import static net.ktnx.mobileledger.utils.Logger.debug;
new MutableLiveData<>(null);
public static final MutableLiveData<Boolean> backgroundTasksRunning =
new MutableLiveData<>(false);
+ public static final MutableLiveData<RetrieveTransactionsTask.Progress> backgroundTaskProgress =
+ new MutableLiveData<>();
public static final MutableLiveData<Date> lastUpdateDate = new MutableLiveData<>();
public static final MutableLiveData<ArrayList<MobileLedgerProfile>> profiles =
new MutableLiveData<>(null);
new MutableLiveData<>();
public static final MutableLiveData<Boolean> currencyGap = new MutableLiveData<>(true);
public static final MutableLiveData<Locale> locale = new MutableLiveData<>(Locale.getDefault());
+ public static final MutableLiveData<Boolean> drawerOpen = new MutableLiveData<>(false);
private static final MutableLiveData<MobileLedgerProfile> profile =
new InertMutableLiveData<>();
private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
public static MobileLedgerProfile getProfile() {
return Objects.requireNonNull(profile.getValue());
}
- public static final MutableLiveData<Boolean> drawerOpen = new MutableLiveData<>(false);
public static void backgroundTaskStarted() {
int cnt = backgroundTaskCount.incrementAndGet();
debug("data",