From 3775284655ecfc838ae81f722e123fee507d25f7 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 22 Aug 2021 19:18:24 +0300 Subject: [PATCH] do not reset the new transaction model in the constructor 1) reset() requires that there is a current profile in Data and that may not be true because the new transaction activity may be started by a shortcut referencing a profile that was removed and that may have been the last profile, i.e. there may be no profiles at that moment 2) reset is later called by the new transaction fragment anyway, when it has ensured that there is an active profile --- .../mobileledger/ui/new_transaction/NewTransactionModel.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java index 35bb3c82..8b96f365 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java @@ -80,7 +80,6 @@ public class NewTransactionModel extends ViewModel { private final MutableLiveData focusInfo = new MutableLiveData<>(); private boolean observingDataProfile; public NewTransactionModel() { - reset(); } public LiveData getShowCurrency() { return showCurrency; -- 2.39.2