]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailModel.java
replace local utility functions with ones from TextUtils
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / ui / profiles / ProfileDetailModel.java
index 2a655dccd224b11d537ab24c9a4d89c0bded23b2..915ab032b58fc4a26e9e8be7b2f58899781685b5 100644 (file)
@@ -17,6 +17,8 @@
 
 package net.ktnx.mobileledger.ui.profiles;
 
+import android.text.TextUtils;
+
 import androidx.lifecycle.LifecycleOwner;
 import androidx.lifecycle.MutableLiveData;
 import androidx.lifecycle.Observer;
@@ -25,6 +27,7 @@ import androidx.lifecycle.ViewModel;
 import net.ktnx.mobileledger.async.SendTransactionTask;
 import net.ktnx.mobileledger.model.Currency;
 import net.ktnx.mobileledger.model.MobileLedgerProfile;
+import net.ktnx.mobileledger.utils.Colors;
 import net.ktnx.mobileledger.utils.Misc;
 
 public class ProfileDetailModel extends ViewModel {
@@ -44,6 +47,7 @@ public class ProfileDetailModel extends ViewModel {
     private final MutableLiveData<String> authPassword = new MutableLiveData<>(null);
     private final MutableLiveData<String> preferredAccountsFilter = new MutableLiveData<>(null);
     private final MutableLiveData<Integer> themeId = new MutableLiveData<>(-1);
+    public int initialThemeHue = Colors.DEFAULT_HUE_DEG;
     public ProfileDetailModel() {
     }
     String getProfileName() {
@@ -201,7 +205,7 @@ public class ProfileDetailModel extends ViewModel {
             showCommodityByDefault.setValue(mProfile.getShowCommodityByDefault());
             {
                 String comm = mProfile.getDefaultCommodity();
-                if (Misc.isEmptyOrNull(comm))
+                if (TextUtils.isEmpty(comm))
                     setDefaultCommodity(null);
                 else
                     setDefaultCommodity(new Currency(-1, comm));