Skip to content
Snippets Groups Projects
Commit e60f108d authored by Adrien Béraud's avatar Adrien Béraud
Browse files

contact requests: check for presenter

Change-Id: Ie9c49793006c0bf29dfe12707b55d7611a5e14ec
parent 471facd3
No related branches found
No related tags found
No related merge requests found
......@@ -394,13 +394,13 @@ public class HomeActivity extends AppCompatActivity implements BottomNavigationV
}
private void presentTrustRequestFragment(String accountID) {
Bundle bundle = new Bundle();
bundle.putString(ContactRequestsFragment.ACCOUNT_ID, accountID);
mNotificationService.cancelTrustRequestNotification(accountID);
if (fContent instanceof ContactRequestsFragment) {
((ContactRequestsFragment) fContent).presentForAccount(accountID);
return;
}
Bundle bundle = new Bundle();
bundle.putString(ContactRequestsFragment.ACCOUNT_ID, accountID);
fContent = new ContactRequestsFragment();
fContent.setArguments(bundle);
binding.navigationView.getMenu().getItem(NAVIGATION_CONTACT_REQUESTS).setChecked(true);
......
......@@ -75,10 +75,11 @@ public class ContactRequestsFragment extends BaseSupportFragment<ContactRequests
}
public void presentForAccount(@NonNull String accountId) {
presenter.updateAccount(accountId);
Bundle arguments = getArguments();
if (arguments != null)
arguments.putString(ACCOUNT_ID, accountId);
if (presenter != null)
presenter.updateAccount(accountId);
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment