Some fixes

This commit is contained in:
Thomas 2022-07-19 11:19:50 +02:00
parent f2b4c8aa69
commit 192c2c6469
5 changed files with 6 additions and 8 deletions

View File

@ -80,7 +80,7 @@ public class Account implements Serializable {
public Account moved;
public synchronized Spannable getSpanDisplayName(Context context, WeakReference<View> viewWeakReference) {
if (display_name == null) {
if (display_name == null || display_name.isEmpty()) {
display_name = username;
}
return SpannableHelper.convert(context, display_name, null, this, null, true, viewWeakReference);

View File

@ -58,7 +58,7 @@ public class Poll implements Serializable {
@SerializedName("votes_count")
public int votes_count;
public Spannable span_title;
public transient Spannable span_title;
public Spannable getSpanTitle(Context context, Status status, WeakReference<View> viewWeakReference) {
span_title = SpannableHelper.convert(context, title, status, null, null, true, viewWeakReference);

View File

@ -40,7 +40,6 @@ import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
@ -396,10 +395,12 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
Helper.changeDrawableColor(context, holder.binding.statusBoostIcon, theme_text_header_2_line);
Helper.changeDrawableColor(context, holder.binding.statusPinned, theme_text_header_2_line);
}
Log.v(Helper.TAG, "theme_statuses_color: " + theme_statuses_color);
if (theme_statuses_color != -1) {
holder.binding.cardviewContainer.setBackgroundColor(theme_statuses_color);
holder.binding.translationLabel.setBackgroundColor(theme_statuses_color);
} else {
holder.binding.cardviewContainer.setBackgroundColor(ContextCompat.getColor(context, R.color.cyanea_primary_dark_reference));
holder.binding.translationLabel.setBackgroundColor(ContextCompat.getColor(context, R.color.cyanea_primary_dark_reference));
}
if (theme_boost_header_color != -1 && status.reblog != null) {
holder.binding.statusBoosterInfo.setBackgroundColor(theme_boost_header_color);
@ -773,7 +774,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
} else {
holder.binding.botIcon.setVisibility(View.GONE);
}
if (statusToDeal.in_reply_to_id != null) {
if (statusToDeal.in_reply_to_id != null && timelineType != Timeline.TimeLineEnum.UNKNOWN) {
holder.binding.replyIcon.setVisibility(View.VISIBLE);
} else {
holder.binding.replyIcon.setVisibility(View.GONE);

View File

@ -19,7 +19,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cardview_container"
android:layout_width="match_parent"
android:backgroundTint="@color/cyanea_primary_dark_reference"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/card_margin"
android:layout_marginTop="@dimen/card_margin"
@ -35,7 +34,6 @@
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp" />

View File

@ -20,7 +20,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:backgroundTint="@color/cyanea_primary_dark_reference"
android:layout_marginTop="12dp"
android:clipChildren="false"
android:clipToPadding="false"