Ejemplo n.º 1
0
  @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();
    }
  }
Ejemplo n.º 2
0
 @Override
 protected boolean viewUser(User user) {
   if (repo.getOwner().getId() != user.getId()) {
     startActivity(UserViewActivity.createIntent(user));
     return true;
   }
   return false;
 }