Skip to content

Commit

Permalink
Merge pull request #78 from AndreySBer/bugfix-77
Browse files Browse the repository at this point in the history
Fix bug #77
  • Loading branch information
phansier committed Jan 29, 2018
2 parents 5f549cc + af5a5a0 commit 8e2b5db
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions app/src/main/java/com/github/mobile/ui/milestone/IssueDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ public List<Issue> getIssues() {
return repositoryIssues;
}

private void load() {
public void show() {
new ProgressDialogTask<ArrayList<Issue>>(activity) {

@Override
public ArrayList<Issue> run(Account account) throws Exception {
ArrayList<Issue> issues = new ArrayList<Issue>();
String[] repid = repository.generateId().split("/");
issues.addAll(service.getIssues(repid[0],repid[1], "none").execute().body());
issues.addAll(service.getIssues(repid[0], repid[1], "none").execute().body());
return issues;
}

Expand All @@ -89,7 +89,9 @@ protected void onSuccess(ArrayList<Issue> all) throws Exception {
super.onSuccess(all);

repositoryIssues = all;
show();
IssueDialogFragment.show(activity, requestCode,
activity.getString(R.string.ms_select_issue), null,
repositoryIssues);
}

@Override
Expand All @@ -108,19 +110,4 @@ public void execute() {
}
}.execute();
}

/**
* Show dialog
*
*/
public void show() {
if (repositoryIssues == null) {
load();
return;
}

IssueDialogFragment.show(activity, requestCode,
activity.getString(R.string.ms_select_issue), null,
repositoryIssues);
}
}

0 comments on commit 8e2b5db

Please sign in to comment.