diff --git a/app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java b/app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java
index 76f8d4e5..154cacab 100644
--- a/app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java
+++ b/app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java
@@ -104,6 +104,7 @@ public class IssueDetailActivity extends BaseActivity {
private LinearLayout assigneesLayout;
private View divider;
private ProgressBar progressBar;
+ private ImageView issuePrState;
@Override
protected int getLayoutResourceId() {
@@ -145,6 +146,7 @@ public class IssueDetailActivity extends BaseActivity {
assigneesLayout = findViewById(R.id.frameAssignees);
divider = findViewById(R.id.divider);
progressBar = findViewById(R.id.progressBar);
+ issuePrState = findViewById(R.id.issuePrState);
Toolbar toolbar = findViewById(R.id.toolbar);
TextView toolbarTitle = toolbar.findViewById(R.id.toolbar_title);
@@ -351,6 +353,27 @@ public class IssueDetailActivity extends BaseActivity {
Issues singleIssue = response.body();
assert singleIssue != null;
+ issuePrState.setVisibility(View.VISIBLE);
+ if(singleIssue.getPull_request() != null) {
+
+ if(singleIssue.getPull_request().isMerged()) { // merged
+
+ issuePrState.setImageResource(R.drawable.ic_pull_request_merged);
+ }
+ else if(!singleIssue.getPull_request().isMerged() && singleIssue.getState().equals("closed")) { // closed
+
+ issuePrState.setImageResource(R.drawable.ic_pull_request_closed);
+ }
+ else { // open
+
+ issuePrState.setImageResource(R.drawable.ic_pull_request);
+ }
+ }
+ else if(singleIssue.getState().equals("closed")) { // issue closed
+
+ issuePrState.setImageResource(R.drawable.ic_issue_closed_red);
+ }
+
final Markwon markwon = Markwon.builder(Objects.requireNonNull(ctx)).usePlugin(CorePlugin.create())
.usePlugin(ImagesPlugin.create(plugin -> {
plugin.addSchemeHandler(new SchemeHandler() {
diff --git a/app/src/main/res/drawable/ic_issue_closed_red.xml b/app/src/main/res/drawable/ic_issue_closed_red.xml
new file mode 100644
index 00000000..0f0ee63f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_issue_closed_red.xml
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_pull_request_closed.xml b/app/src/main/res/drawable/ic_pull_request_closed.xml
new file mode 100644
index 00000000..2845a5c8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_pull_request_closed.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_pull_request_merged.xml b/app/src/main/res/drawable/ic_pull_request_merged.xml
new file mode 100644
index 00000000..e68c8a06
--- /dev/null
+++ b/app/src/main/res/drawable/ic_pull_request_merged.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_issue_detail.xml b/app/src/main/res/layout/activity_issue_detail.xml
index 80efb9cd..0d642551 100644
--- a/app/src/main/res/layout/activity_issue_detail.xml
+++ b/app/src/main/res/layout/activity_issue_detail.xml
@@ -19,6 +19,16 @@
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor">
+
+
#6200EE
#03DAC6
+ #a333c8
+ #db2828
+