@Override public void onOrganizationSelected(final User organization) { User previousOrg = org.get(); int previousOrgId = previousOrg != null ? previousOrg.getId() : -1; org.set(organization); if (recentRepos != null) recentRepos.saveAsync(); // Only hard refresh if view already created and org is changing if (previousOrgId != organization.getId()) { Activity activity = getActivity(); if (activity != null) recentRepos = new RecentRepositories(activity, organization); refreshWithProgress(); } }
@Override protected boolean viewUser(User user) { if (repo.getOwner().getId() != user.getId()) { startActivity(UserViewActivity.createIntent(user)); return true; } return false; }