From fc8eb5f547d1769be0c5cd5b5b14a8684a942c4f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 15 Aug 2020 12:02:32 +0000 Subject: [PATCH] CurrencySelectorModel: proper initialization of currencies list --- .../java/net/ktnx/mobileledger/ui/CurrencySelectorModel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5