X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Faccount_summary%2FAccountSummaryFragment.java;h=174a4b2c775f0ed43fd25c3ac85bfbcfc0061800;hb=748544f53147c7e811f8b11c081ed162a3870cb3;hp=eb61dcc6b0bbee9f37a4ff0188687971afe5e113;hpb=0ce370cea3c5c980b6eeb14acf965188ae951f51;p=mobile-ledger-staging.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 eb61dcc6..174a4b2c 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 @@ -89,22 +89,21 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { manageFabOnScroll(); - swiper = mainActivity.findViewById(R.id.account_swiper); + refreshLayout = mainActivity.findViewById(R.id.account_swipe_refresh_layout); Colors.themeWatch.observe(getViewLifecycleOwner(), this::themeChanged); - swiper.setOnRefreshListener(() -> { + refreshLayout.setOnRefreshListener(() -> { debug("ui", "refreshing accounts via swipe"); Data.scheduleTransactionListRetrieval(mainActivity); }); MobileLedgerProfile profile = Data.getProfile(); profile.getDisplayedAccounts() - .observe(getViewLifecycleOwner(), - (accounts) -> onAccountsChanged(profile, accounts)); + .observe(getViewLifecycleOwner(), this::onAccountsChanged); } - private void onAccountsChanged(MobileLedgerProfile profile, List accounts) { + private void onAccountsChanged(List accounts) { Logger.debug("async-acc", String.format(Locale.US, "fragment: got new account list (%d items)", accounts.size())); - modelAdapter.setAccounts(profile, accounts); + modelAdapter.setAccounts(accounts); } }