use of io.github.mthli.Bitocle.Star.StarItem in project Bitocle by mthli.
the class MainFragment method clickWhenStar.
private void clickWhenStar(int position) {
allTaskDown();
StarItem item = starItemList.get(position);
owner = item.getOwner();
name = item.getName();
title = name;
subTitle = name;
actionBar.setTitle(title);
actionBar.setSubtitle(subTitle);
actionBar.setDisplayHomeAsUpEnabled(true);
root = null;
entry = null;
toggle = false;
prefix = "/";
listView.setAdapter(contentItemAdapter);
contentItemAdapter.notifyDataSetChanged();
flag = Flag.STAR_CONTENT_FIRST;
currentId = STAR_CONTENT_ID;
starContentTask = new StarContentTask(MainFragment.this);
starContentTask.execute();
}
use of io.github.mthli.Bitocle.Star.StarItem in project Bitocle by mthli.
the class MainFragment method changeToCommit.
public void changeToCommit(int status) {
allTaskDown();
hideWhenCommit();
setContentEmpty(false);
setContentShown(true);
entry = null;
root = null;
toggle = false;
prefix = "/";
listView.setAdapter(commitItemAdapter);
contentItemAdapter.notifyDataSetChanged();
if (currentId == REPO_ID || flag == Flag.REPO_COMMIT_FIRST || flag == Flag.REPO_COMMIT_REFRESH) {
//
RepoItem repoItem = repoItemList.get(location);
actionBar.setTitle(repoItem.getName());
flag = status;
commitTask = new CommitTask(MainFragment.this, repoItem, null);
commitTask.execute();
} else {
StarItem starItem = starItemList.get(location);
actionBar.setTitle(starItem.getName());
flag = status;
commitTask = new CommitTask(MainFragment.this, null, starItem);
commitTask.execute();
}
actionBar.setSubtitle(R.string.commit_label);
actionBar.setDisplayHomeAsUpEnabled(true);
currentId = COMMIT_ID;
}
Aggregations