From cafa154ed6dc563ce3eed57cfa4d66803cc9dcf6 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 22 Dec 2019 14:57:57 +0200 Subject: [PATCH] AccountSummary: fix stuck refreshing indicator after swipe-refresh is followed by a slide to the transaction list caused by registering the observer of the background task indicator in the wrong place --- .../ui/account_summary/AccountSummaryFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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..cdb2e59a 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 @@ -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,6 +65,9 @@ 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; -- 2.39.5