Ver código fonte

update ms

pull/21/head
M M Arif 1 ano atrás
pai
commit
102a906f62
2 arquivos alterados com 8 adições e 4 exclusões
  1. +6
    -3
      app/src/main/java/org/mian/gitnex/activities/EditIssueActivity.java
  2. +2
    -1
      app/src/main/java/org/mian/gitnex/models/CreateIssue.java

+ 6
- 3
app/src/main/java/org/mian/gitnex/activities/EditIssueActivity.java Ver arquivo

@ -179,6 +179,9 @@ public class EditIssueActivity extends AppCompatActivity implements View.OnClick
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
final int issueIndex = Integer.parseInt(tinyDb.getString("issueNumber"));
Milestones mModel = (Milestones) editIssueMilestoneSpinner.getSelectedItem();
int editIssueMilestoneId = mModel.getId();
String editIssueTitleForm = editIssueTitle.getText().toString();
String editIssueDescriptionForm = editIssueDescription.getText().toString();
@ -213,15 +216,15 @@ public class EditIssueActivity extends AppCompatActivity implements View.OnClick
//Log.i("editIssueDueDateForm", String.valueOf(editIssueDueDateForm));
disableProcessButton();
editIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid, editIssueTitleForm, editIssueDescriptionForm, editIssueDueDateForm);
editIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid, editIssueTitleForm, editIssueDescriptionForm, editIssueDueDateForm, editIssueMilestoneId);
}
private void editIssue(String instanceUrl, String instanceToken, String repoOwner, String repoName, int issueIndex, String loginUid, String title, String description, String dueDate) {
private void editIssue(String instanceUrl, String instanceToken, String repoOwner, String repoName, int issueIndex, String loginUid, String title, String description, String dueDate, int editIssueMilestoneId) {
final TinyDB tinyDb = new TinyDB(getApplicationContext());
CreateIssue issueData = new CreateIssue(title, description, dueDate);
CreateIssue issueData = new CreateIssue(title, description, dueDate, editIssueMilestoneId);
Call<JsonElement> call = RetrofitClient
.getInstance(instanceUrl)

+ 2
- 1
app/src/main/java/org/mian/gitnex/models/CreateIssue.java Ver arquivo

@ -29,10 +29,11 @@ public class CreateIssue {
this.labels = labels;
}
public CreateIssue(String title, String body, String due_date) {
public CreateIssue(String title, String body, String due_date, int milestone) {
this.title = title;
this.body = body;
this.due_date = due_date;
this.milestone = milestone;
}
private class Assignees {