From f7c68a80b43e40e69b074f2cc47ccec769b12b75 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Wed, 15 May 2024 05:38:44 +0000 Subject: [PATCH] Fix attachments for comments and improve comment UI (#1358) As title Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1358 Co-authored-by: M M Arif Co-committed-by: M M Arif --- .../mian/gitnex/adapters/IssueCommentsAdapter.java | 12 ++++++++---- app/src/main/res/layout/activity_issue_detail.xml | 12 ++++++------ app/src/main/res/values/dimens.xml | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java b/app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java index 64b59946..a069092c 100644 --- a/app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java +++ b/app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java @@ -260,10 +260,14 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter getAttachments(issueComment.getId(), view, token), 250); - } + new Handler() + .postDelayed( + () -> { + if (issueComment != null) { + getAttachments(issueComment.getId(), view, token); + } + }, + 250); menu.setOnClickListener( v -> { diff --git a/app/src/main/res/layout/activity_issue_detail.xml b/app/src/main/res/layout/activity_issue_detail.xml index b1b6b679..a758fa50 100644 --- a/app/src/main/res/layout/activity_issue_detail.xml +++ b/app/src/main/res/layout/activity_issue_detail.xml @@ -406,22 +406,22 @@ android:paddingTop="@dimen/dimen8dp" android:paddingBottom="@dimen/dimen8dp" android:textColor="?attr/inputTextColor" - android:layout_marginEnd="@dimen/dimen12dp" - android:textSize="@dimen/dimen14sp" /> + android:layout_marginEnd="@dimen/dimen8dp" + android:textSize="@dimen/dimen16sp" /> 28dp 32dp 36dp + 38dp 40dp 44dp 48dp