diff options
author | Thomas <tschneider.ac@gmail.com> | 2022-05-17 10:14:15 +0200 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2022-05-17 10:14:15 +0200 |
commit | bb6e31c00ac1b0e5782af2fb2fe3b24822aaf0e1 (patch) | |
tree | a39058f7b92c72933c7b78126be180e31f88b380 /app | |
parent | b0405ae8542ac2b7baaf6352e18c29e586818791 (diff) |
Fix issue #58 - Add a small "+" at the bottom right of reply icon to indicate that there is replies
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java | 7 | ||||
-rw-r--r-- | app/src/main/res/layout/drawer_status.xml | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 41cb4319b..0e35584aa 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -265,6 +265,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> holder.binding.actionButtonFavorite.setInActiveImageTintColor(theme_icons_color); holder.binding.actionButtonBookmark.setInActiveImageTintColor(theme_icons_color); holder.binding.actionButtonBoost.setInActiveImageTintColor(theme_icons_color); + holder.binding.replyCount.setTextColor(theme_text_color); } else { holder.binding.actionButtonFavorite.setInActiveImageTintColor(ThemeHelper.getAttColor(context, R.attr.colorControlNormal)); holder.binding.actionButtonBookmark.setInActiveImageTintColor(ThemeHelper.getAttColor(context, R.attr.colorControlNormal)); @@ -941,7 +942,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> holder.binding.attachmentsListContainer.setVisibility(View.GONE); } holder.binding.statusContent.setMovementMethod(LongClickLinkMovementMethod.getInstance()); - //holder.binding.statusContent.setMovementMethod(LinkMovementMethod.getInstance()); holder.binding.reblogInfo.setOnClickListener(v -> { if (remote) { Toasty.info(context, context.getString(R.string.retrieve_remote_status), Toasty.LENGTH_SHORT).show(); @@ -1452,6 +1452,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> }); popup.show(); }); + if (statusToDeal.replies_count > 0 && !(context instanceof ContextActivity)) { + holder.binding.replyCount.setVisibility(View.VISIBLE); + } else { + holder.binding.replyCount.setVisibility(View.GONE); + } holder.binding.actionButtonReply.setOnLongClickListener(v -> { CrossActionHelper.doCrossAction(context, CrossActionHelper.TypeOfCrossAction.REPLY_ACTION, null, statusToDeal); return true; diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml index 2cd184873..575a488f7 100644 --- a/app/src/main/res/layout/drawer_status.xml +++ b/app/src/main/res/layout/drawer_status.xml @@ -401,6 +401,17 @@ android:adjustViewBounds="true" app:srcCompat="@drawable/ic_reply" /> + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/reply_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:text="+" + android:textColor="?colorControlNormal" + android:textSize="12sp" + android:visibility="gone" + tools:ignore="HardcodedText" /> + <com.varunest.sparkbutton.SparkButton android:id="@+id/action_button_favorite" android:layout_width="28dp" |