From: Damyan Ivanov Date: Sat, 15 Aug 2020 12:02:32 +0000 (+0000) Subject: CurrencySelectorModel: proper initialization of currencies list X-Git-Tag: v0.15.0~63 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=fc8eb5f547d1769be0c5cd5b5b14a8684a942c4f;p=mobile-ledger.git CurrencySelectorModel: proper initialization of currencies list --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java index 89b78792..4b346cdf 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java @@ -24,6 +24,7 @@ import androidx.lifecycle.ViewModel; import net.ktnx.mobileledger.model.Currency; +import java.util.ArrayList; import java.util.List; public class CurrencySelectorModel extends ViewModel { @@ -31,7 +32,7 @@ public class CurrencySelectorModel extends ViewModel { private final MutableLiveData positionAndPaddingVisible = new MutableLiveData<>(true); private OnCurrencySelectedListener selectionListener; public CurrencySelectorModel() { - this.currencies = new MutableLiveData<>(); + this.currencies = new MutableLiveData<>(new ArrayList<>()); } public void showPositionAndPadding() { positionAndPaddingVisible.postValue(true);