-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbde726
commit 4d5c731
Showing
4 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import static com.github.mobile.RequestCodes.COMMENT_CREATE; | ||
import static com.github.mobile.RequestCodes.ISSUE_ASSIGNEE_UPDATE; | ||
import static com.github.mobile.RequestCodes.ISSUE_CLOSE; | ||
import static com.github.mobile.RequestCodes.ISSUE_EDIT; | ||
import static com.github.mobile.RequestCodes.ISSUE_LABELS_UPDATE; | ||
import static com.github.mobile.RequestCodes.ISSUE_MILESTONE_UPDATE; | ||
import static com.github.mobile.RequestCodes.ISSUE_REOPEN; | ||
|
||
import android.os.Bundle; | ||
|
||
class SwitchClass1 { | ||
private EditMilestoneTask milestoneTask; | ||
private EditAssigneeTask assigneeTask; | ||
private EditLabelsTask labelsTask; | ||
private EditStateTask stateTask; | ||
|
||
public void onDialogResult(int requestCode, int resultCode, Bundle arguments) { | ||
if (RESULT_OK != resultCode) | ||
return; | ||
|
||
switch (requestCode) { | ||
case ISSUE_MILESTONE_UPDATE: | ||
milestoneTask.edit(MilestoneDialogFragment.getSelected(arguments)); | ||
break; | ||
case ISSUE_ASSIGNEE_UPDATE: | ||
assigneeTask.edit(AssigneeDialogFragment.getSelected(arguments)); | ||
break; | ||
case ISSUE_LABELS_UPDATE: | ||
ArrayList<Label> labels = LabelsDialogFragment | ||
.getSelected(arguments); | ||
if (labels != null && !labels.isEmpty()) | ||
labelsTask.edit(labels.toArray(new Label[labels.size()])); | ||
else | ||
labelsTask.edit(null); | ||
break; | ||
case ISSUE_CLOSE: | ||
stateTask.edit(true); | ||
break; | ||
case ISSUE_REOPEN: | ||
stateTask.edit(false); | ||
break; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters