Search in sources :

Example 1 with CommitTask

use of io.github.mthli.Bitocle.Commit.CommitTask 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;
}
Also used : StarItem(io.github.mthli.Bitocle.Star.StarItem) CommitTask(io.github.mthli.Bitocle.Commit.CommitTask)

Aggregations

CommitTask (io.github.mthli.Bitocle.Commit.CommitTask)1 StarItem (io.github.mthli.Bitocle.Star.StarItem)1