Exemplo n.º 1
0
 @Override
 public int getItemPosition(Object object) {
   if (object instanceof ContentListFragment && !StringUtils.isBlank(mContent.getSha())) {
     return POSITION_NONE;
   }
   return POSITION_UNCHANGED;
 }
Exemplo n.º 2
0
 private void openFileViewer(Content content, String ref) {
   Intent intent = new Intent().setClass(this, FileViewerActivity.class);
   intent.putExtra(Constants.Repository.REPO_OWNER, mRepoOwner);
   intent.putExtra(Constants.Repository.REPO_NAME, mRepoName);
   intent.putExtra(Constants.Object.PATH, content.getPath());
   intent.putExtra(Constants.Object.REF, ref);
   intent.putExtra(Constants.Object.NAME, content.getName());
   intent.putExtra(Constants.Object.OBJECT_SHA, content.getSha());
   startActivity(intent);
 }