From: Damyan Ivanov Date: Fri, 11 Jan 2019 20:15:27 +0000 (+0000) Subject: one more lambda X-Git-Tag: v0.3~65 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=62fd5c71d3eda795706f960c39d72f7006440ab0;p=mobile-ledger.git one more lambda --- 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 7f1c8f3a..66008e9c 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 @@ -71,17 +71,14 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { if (backgroundTaskCountObserver == null) { Log.d("acc", "creating background task count observer"); - Data.backgroundTaskCount.addObserver(backgroundTaskCountObserver = new Observer() { - @Override - public void update(Observable o, Object arg) { - if (mActivity == null) return; - if (swiper == null) return; - mActivity.runOnUiThread(() -> { - int cnt = Data.backgroundTaskCount.get(); - Log.d("acc", String.format("background task count changed to %d", cnt)); - swiper.setRefreshing(cnt > 0); - }); - } + Data.backgroundTaskCount.addObserver(backgroundTaskCountObserver = (o, arg) -> { + if (mActivity == null) return; + if (swiper == null) return; + mActivity.runOnUiThread(() -> { + int cnt = Data.backgroundTaskCount.get(); + Log.d("acc", String.format("background task count changed to %d", cnt)); + swiper.setRefreshing(cnt > 0); + }); }); } }