diff --git a/ring-android/app/src/main/java/cx/ring/client/HomeActivity.java b/ring-android/app/src/main/java/cx/ring/client/HomeActivity.java index dc5cf74572cca2febe5f5598a06227e0921c757c..dec214bbbb19bf163d760eff9a1935697e524dd4 100644 --- a/ring-android/app/src/main/java/cx/ring/client/HomeActivity.java +++ b/ring-android/app/src/main/java/cx/ring/client/HomeActivity.java @@ -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); diff --git a/ring-android/app/src/main/java/cx/ring/contactrequests/ContactRequestsFragment.java b/ring-android/app/src/main/java/cx/ring/contactrequests/ContactRequestsFragment.java index edce037f541ed354aa572eeefb43fa6b7f484a05..f3e9f4eea179b62695ed8717cbfd7323aa81e53b 100644 --- a/ring-android/app/src/main/java/cx/ring/contactrequests/ContactRequestsFragment.java +++ b/ring-android/app/src/main/java/cx/ring/contactrequests/ContactRequestsFragment.java @@ -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