X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FData.java;h=5764434f33b3dbb76f446d97cf9162986f98d1ec;hp=7c5895a104fc1a6a978acf2e3fb3b06ef932ef03;hb=2c14b80572cc9199f7ed0171786a04931075b50d;hpb=217da55a224e2ae899d0b50604e2e54f882ec04f diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 7c5895a1..5764434f 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2020 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -31,6 +31,7 @@ import net.ktnx.mobileledger.utils.Locker; import net.ktnx.mobileledger.utils.Logger; import net.ktnx.mobileledger.utils.MLDB; import net.ktnx.mobileledger.utils.ObservableList; +import net.ktnx.mobileledger.utils.SimpleDate; import java.lang.ref.WeakReference; import java.text.NumberFormat; @@ -45,8 +46,14 @@ import static net.ktnx.mobileledger.utils.Logger.debug; public final class Data { public static final ObservableList transactions = new ObservableList<>(new ArrayList<>()); - public static final ObservableList accounts = new ObservableList<>(new ArrayList<>()); - public static final MutableLiveData backgroundTasksRunning = new MutableLiveData<>(false); + public static final MutableLiveData earliestTransactionDate = + new MutableLiveData<>(null); + public static final MutableLiveData latestTransactionDate = + new MutableLiveData<>(null); + public static final ObservableList accounts = + new ObservableList<>(new ArrayList<>()); + public static final MutableLiveData backgroundTasksRunning = + new MutableLiveData<>(false); public static final MutableLiveData lastUpdateDate = new MutableLiveData<>(); public static final MutableLiveData profile = new InertMutableLiveData<>(); public static final MutableLiveData> profiles = @@ -58,6 +65,7 @@ public final class Data { public static final MutableLiveData locale = new MutableLiveData<>(Locale.getDefault()); private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0); private static final Locker profilesLocker = new Locker(); + public static MutableLiveData foundTransactionItemIndex = new MutableLiveData<>(null); private static RetrieveTransactionsTask retrieveTransactionsTask; public static final MutableLiveData drawerOpen = new MutableLiveData<>(false); public static void backgroundTaskStarted() {