]> git.ktnx.net Git - mobile-ledger.git/commitdiff
one more lambda
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 11 Jan 2019 20:15:27 +0000 (20:15 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 11 Jan 2019 20:15:27 +0000 (20:15 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java

index 7f1c8f3a27aff856611b52eae8453226b2b44715..66008e9c21221f0f98f1e07ade2614f553b4049b 100644 (file)
@@ -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);
+                });
             });
         }
     }