some changes

pull/307/head
Thomas 2 years ago
parent f936bc2c35
commit e178ce1045

@ -325,14 +325,15 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
boolean long_press_media = sharedpreferences.getBoolean(context.getString(R.string.SET_LONG_PRESS_STORE_MEDIA), false);
if (MainActivity.currentAccount != null && MainActivity.currentAccount.api == Account.API.PLEROMA) {
holder.binding.layoutReactions.getRoot().setVisibility(View.VISIBLE);
if (status.pleroma != null && status.pleroma.emoji_reactions != null && status.pleroma.emoji_reactions.size() > 0) {
holder.binding.layoutReactions.getRoot().setVisibility(View.VISIBLE);
ReactionAdapter reactionAdapter = new ReactionAdapter(status.id, status.pleroma.emoji_reactions);
holder.binding.layoutReactions.reactionsView.setAdapter(reactionAdapter);
LinearLayoutManager layoutManager
= new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
holder.binding.layoutReactions.reactionsView.setLayoutManager(layoutManager);
} else {
holder.binding.layoutReactions.getRoot().setVisibility(View.GONE);
holder.binding.layoutReactions.reactionsView.setAdapter(null);
}
holder.binding.statusEmoji.setOnClickListener(v -> {
@ -455,9 +456,14 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
theme_text_header_2_line = sharedpreferences.getInt("theme_text_header_2_line", -1);
}
if (MainActivity.currentAccount != null && MainActivity.currentAccount.api == Account.API.PLEROMA) {
holder.binding.statusAddCustomEmoji.setVisibility(View.VISIBLE);
holder.binding.statusEmoji.setVisibility(View.VISIBLE);
}
if (theme_icons_color != -1) {
Helper.changeDrawableColor(context, holder.binding.actionButtonReply, theme_icons_color);
Helper.changeDrawableColor(context, holder.binding.statusAddCustomEmoji, theme_icons_color);
Helper.changeDrawableColor(context, holder.binding.statusEmoji, theme_icons_color);
Helper.changeDrawableColor(context, holder.binding.actionButtonMore, theme_icons_color);
Helper.changeDrawableColor(context, R.drawable.ic_baseline_star_24, theme_icons_color);
Helper.changeDrawableColor(context, R.drawable.ic_repeat, theme_icons_color);

@ -1,7 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path

@ -1,7 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path

@ -517,6 +517,12 @@
app:srcCompat="@drawable/ic_baseline_share_24" />
</androidx.appcompat.widget.LinearLayoutCompat>
<include
android:id="@+id/layout_reactions"
layout="@layout/layout_reactions"
android:visibility="gone"
tools:visibility="visible" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/action_buttons"
android:layout_width="match_parent"
@ -595,21 +601,23 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status_add_custom_emoji"
android:layout_width="28dp"
android:visibility="gone"
tools:visibility="visible"
android:layout_height="28dp"
android:contentDescription="@string/add_reaction"
android:padding="3dp"
android:src="@drawable/ic_baseline_emoji_emotions_24"
app:tint="?attr/iconColor" />
android:src="@drawable/ic_baseline_emoji_emotions_24" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status_emoji"
android:layout_width="28dp"
android:layout_height="28dp"
android:visibility="gone"
tools:visibility="visible"
android:layout_marginStart="6dp"
android:contentDescription="@string/add_reaction"
android:padding="3dp"
android:src="@drawable/ic_baseline_add_reaction_24"
app:tint="?attr/iconColor" />
android:src="@drawable/ic_baseline_add_reaction_24" />
<View
android:layout_width="0dp"
@ -626,11 +634,6 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<include
android:id="@+id/layout_reactions"
layout="@layout/layout_reactions"
android:visibility="gone"
tools:visibility="visible" />
</androidx.appcompat.widget.LinearLayoutCompat>

@ -3,11 +3,12 @@
android:id="@+id/status_reactions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginStart="48dp"
android:layout_marginEnd="6dp"
android:orientation="horizontal"
android:paddingBottom="10dp">
android:layout_marginBottom="5dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/reactions_view"

Loading…
Cancel
Save