use of com.github.pockethub.android.ui.BaseActivity in project PocketHub by pockethub.
the class CommitListFragment method switchRefs.
private void switchRefs() {
if (ref == null) {
return;
}
if (dialog == null) {
dialog = new RefDialog((BaseActivity) getActivity(), REF_UPDATE, repository);
}
GitReference reference = GitReference.builder().ref(ref).build();
dialog.show(reference);
}
use of com.github.pockethub.android.ui.BaseActivity in project PocketHub by pockethub.
the class IssueFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle args = getArguments();
repositoryId = InfoUtils.createRepoFromData(args.getString(EXTRA_REPOSITORY_OWNER), args.getString(EXTRA_REPOSITORY_NAME));
issueNumber = args.getInt(EXTRA_ISSUE_NUMBER);
user = args.getParcelable(EXTRA_USER);
canWrite = args.getBoolean(EXTRA_CAN_WRITE_REPO, false);
BaseActivity dialogActivity = (BaseActivity) getActivity();
ProgressObserverAdapter<Issue> observer = new ProgressObserverAdapter<Issue>(getActivity()) {
@Override
public void onNext(Issue issue) {
super.onNext(issue);
updateHeader(issue);
refreshIssue();
}
};
milestoneTask = new EditMilestoneTask(dialogActivity, repositoryId, issueNumber, observer);
assigneeTask = new EditAssigneeTask(dialogActivity, repositoryId, issueNumber, observer);
labelsTask = new EditLabelsTask(dialogActivity, repositoryId, issueNumber, observer);
stateTask = new EditStateTask(dialogActivity, repositoryId, issueNumber, observer);
}
Aggregations