From 6c225e2dbb04a8d81838945504e37d84cc1a98ba Mon Sep 17 00:00:00 2001 From: 0xd9a <0xd9a@noreply.codeberg.org> Date: Wed, 20 Aug 2025 01:58:46 +0530 Subject: [PATCH] Use MaterialButtons for counters in status info line --- .../mastodon/ui/drawer/StatusAdapter.java | 12 ++--- .../layouts/mastodon/layout/drawer_status.xml | 52 +++++-------------- 2 files changed, 20 insertions(+), 44 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index 5446267f..83a682f0 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1347,8 +1347,8 @@ public class StatusAdapter extends RecyclerView.Adapter if (status.isFocused) { holder.binding.statusInfo.setVisibility(View.VISIBLE); - holder.binding.reblogsCount.setText(String.valueOf(status.reblogs_count)); - holder.binding.favoritesCount.setText(String.valueOf(status.favourites_count)); + holder.binding.reblogInfo.setText(String.valueOf(status.reblogs_count)); + holder.binding.favouriteInfo.setText(String.valueOf(status.favourites_count)); if (statusToDeal.edited_at != null) { holder.binding.editTime.setText(context.getString(R.string.edited_message_at, Helper.longDateToString(status.edited_at))); @@ -3203,10 +3203,10 @@ public class StatusAdapter extends RecyclerView.Adapter holder.binding.poll.pollInfo.setTextColor(theme_text_color); holder.binding.cardDescription.setTextColor(theme_text_color); holder.binding.time.setTextColor(theme_text_color); - holder.binding.reblogsCount.setTextColor(theme_text_color); - holder.binding.favoritesCount.setTextColor(theme_text_color); - Helper.changeDrawableColor(context, holder.binding.repeatInfo, theme_text_color); - Helper.changeDrawableColor(context, holder.binding.favInfo, theme_text_color); + holder.binding.reblogInfo.setTextColor(theme_text_color); + holder.binding.favouriteInfo.setTextColor(theme_text_color); + Helper.changeDrawableColor(context, holder.binding.reblogInfo, theme_text_color); + Helper.changeDrawableColor(context, holder.binding.favouriteInfo, theme_text_color); Helper.changeDrawableColor(context, R.drawable.ic_baseline_lock_24, theme_text_color); } if (theme_text_header_1_line != -1) { diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml index 4b303430..e7f96464 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml @@ -568,51 +568,27 @@ android:layout_height="wrap_content" tools:text="1 January 2021, 12:00" /> - + android:minWidth="48dp" + android:textColor="?attr/colorControlNormal" + app:icon="@drawable/ic_repeat" + app:iconTint="?attr/colorControlNormal" + tools:text="10" /> - - - - - - - - - - - - - + android:minWidth="48dp" + android:textColor="?attr/colorControlNormal" + app:icon="@drawable/ic_star_outline" + app:iconTint="?attr/colorControlNormal" + tools:text="10" />