From: Damyan Ivanov Date: Fri, 11 Jan 2019 20:16:12 +0000 (+0000) Subject: two more lambdas X-Git-Tag: v0.3~64 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=98bbfc6d6604db8339f9aa5042a6740ebbd503a2;p=mobile-ledger.git two more lambdas --- 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() {