From eb1204b25b06fd3f1844b481782ab608c5421656 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Tue, 5 Nov 2019 09:18:13 +0100 Subject: [PATCH] Add support for multiple issue templates. Closes #923 --- .../gh4a/activities/IssueEditActivity.java | 402 ++++++++++++++---- .../main/res/layout/row_issue_template.xml | 22 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 353 insertions(+), 72 deletions(-) create mode 100644 app/src/main/res/layout/row_issue_template.xml diff --git a/app/src/main/java/com/gh4a/activities/IssueEditActivity.java b/app/src/main/java/com/gh4a/activities/IssueEditActivity.java index c030e4f3d..36bbc1207 100644 --- a/app/src/main/java/com/gh4a/activities/IssueEditActivity.java +++ b/app/src/main/java/com/gh4a/activities/IssueEditActivity.java @@ -37,9 +37,13 @@ import androidx.viewpager.widget.PagerAdapter; import androidx.appcompat.app.AlertDialog; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; @@ -72,10 +76,14 @@ import java.net.HttpURLConnection; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import io.reactivex.Flowable; import io.reactivex.Single; import retrofit2.Response; @@ -97,6 +105,16 @@ public static Intent makeEditIntent(Context context, String repoOwner, .putExtra("issue", issue); } + private interface OnAssigneesLoaded { + void handleLoad(List assignees); + } + private interface OnLabelsLoaded { + void handleLoad(List