From: Damyan Ivanov Date: Thu, 6 May 2021 19:43:22 +0000 (+0300) Subject: fix currency selector without parameters (position/gap) X-Git-Tag: v0.19.0~21 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=d446296a0a2bd86fc1a4e5de3bed9289dc042396;p=mobile-ledger.git fix currency selector without parameters (position/gap) --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorFragment.java index bcd62d99..759cd90e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/CurrencySelectorFragment.java @@ -197,8 +197,13 @@ public class CurrencySelectorFragment extends AppCompatDialogFragment visible ? View.VISIBLE : View.GONE)); - if ((savedInstanceState != null) ? savedInstanceState.getBoolean(ARG_SHOW_PARAMS, - DEFAULT_SHOW_PARAMS) : DEFAULT_SHOW_PARAMS) + final boolean showParams; + if (getArguments() == null) + showParams = DEFAULT_SHOW_PARAMS; + else + showParams = getArguments().getBoolean(ARG_SHOW_PARAMS, DEFAULT_SHOW_PARAMS); + + if (showParams) model.showPositionAndPadding(); else model.hidePositionAndPadding();