From 98bbfc6d6604db8339f9aa5042a6740ebbd503a2 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 11 Jan 2019 20:16:12 +0000 Subject: [PATCH] two more lambdas --- .../account_summary/AccountSummaryFragment.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 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 66008e9c..0944d1fa 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 @@ -43,7 +43,6 @@ import net.ktnx.mobileledger.ui.RecyclerItemListener; import net.ktnx.mobileledger.ui.activity.MainActivity; import java.util.List; -import java.util.Observable; import java.util.Observer; import static net.ktnx.mobileledger.ui.activity.SettingsActivity.PREF_KEY_SHOW_ONLY_STARRED_ACCOUNTS; @@ -162,18 +161,10 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { mActivity.scheduleTransactionListRetrieval(); }); - Data.accounts.addObserver(new Observer() { - @Override - public void update(Observable o, Object arg) { - mActivity.runOnUiThread(() -> modelAdapter.notifyDataSetChanged()); - } - }); - Data.profile.addObserver(new Observer() { - @Override - public void update(Observable o, Object arg) { - mActivity.runOnUiThread(() -> model.scheduleAccountListReload()); - } - }); + Data.accounts.addObserver( + (o, arg) -> mActivity.runOnUiThread(() -> modelAdapter.notifyDataSetChanged())); + Data.profile.addObserver( + (o, arg) -> mActivity.runOnUiThread(() -> model.scheduleAccountListReload())); update_account_table(); } private void update_account_table() { -- 2.39.5