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