package net.ktnx.mobileledger.ui.profiles;
+import android.text.TextUtils;
+
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Observer;
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 {
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() {
showCommodityByDefault.setValue(mProfile.getShowCommodityByDefault());
{
String comm = mProfile.getDefaultCommodity();
- if (Misc.isEmptyOrNull(comm))
+ if (TextUtils.isEmpty(comm))
setDefaultCommodity(null);
else
setDefaultCommodity(new Currency(-1, comm));