Skip to content

Commit

Permalink
Refresh list of milestones after creating new
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunous committed Feb 3, 2019
1 parent 98bab8a commit bfdef55
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static Intent makeIntent(Context context, String repoOwner, String repoNa
.putExtra("from_pr", fromPullRequest);
}

private static final int REQUEST_EDIT_MILESTONE = 1000;
private static final int REQUEST_CREATE_MILESTONE = 1000;

private static final int[] TITLES = new int[] {
R.string.open, R.string.closed
Expand Down Expand Up @@ -146,7 +146,7 @@ protected Intent navigateUp() {
@Override
public void onClick(View view) {
startActivityForResult(IssueMilestoneEditActivity.makeCreateIntent(this,
mRepoOwner, mRepoName, mParentIsPullRequest), REQUEST_EDIT_MILESTONE);
mRepoOwner, mRepoName, mParentIsPullRequest), REQUEST_CREATE_MILESTONE);
}

@Override
Expand All @@ -157,8 +157,9 @@ protected void invalidateFragments() {

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_EDIT_MILESTONE) {
if (requestCode == REQUEST_CREATE_MILESTONE) {
if (resultCode == RESULT_OK) {
onRefresh();
setResult(RESULT_OK);
}
} else {
Expand Down

0 comments on commit bfdef55

Please sign in to comment.