X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Faccount_summary%2FAccountSummaryFragment.java;h=8ee910b54fe33b4c33655cc771fc18cd8d0fb167;hb=accc48ea8a6f092716a99d2e21f3c6b95a7e9c37;hp=8eef8fbeaf3256ce9d984087760e4b3e39f82e67;hpb=233b37f00eb4abcda08cacade8ab6d13a8e0ebcf;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java index 8eef8fbe..8ee910b5 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2020 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -46,9 +46,6 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { super.onCreate(savedInstanceState); debug("flow", "AccountSummaryFragment.onCreate()"); setHasOptionsMenu(true); - - Data.backgroundTasksRunning.observe(this.getViewLifecycleOwner(), - this::onBackgroundTaskRunningChanged); } public void onAttach(@NotNull Context context) { super.onAttach(context); @@ -68,9 +65,11 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { debug("flow", "AccountSummaryFragment.onActivityCreated()"); super.onActivityCreated(savedInstanceState); + Data.backgroundTasksRunning.observe(this.getViewLifecycleOwner(), + this::onBackgroundTaskRunningChanged); + modelAdapter = new AccountSummaryAdapter(); - mActivity.mAccountSummaryFragment = this; root = mActivity.findViewById(R.id.account_root); LinearLayoutManager llm = new LinearLayoutManager(mActivity); llm.setOrientation(RecyclerView.VERTICAL);