- MobileLedgerProfile profile = Data.profile.getValue();
- if (profile != null) {
- profile.getDisplayedAccounts()
- .observe(getViewLifecycleOwner(),
- (accounts) -> onAccountsChanged(profile, accounts));
- }
+ model.getDisplayedAccounts()
+ .observe(getViewLifecycleOwner(), this::onAccountsChanged);