Avoid some crashes when using drafts
This commit is contained in:
parent
331a5433ad
commit
501c545a14
|
@ -1075,11 +1075,14 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
new WeakReference<>(holder.binding.statusContent)),
|
new WeakReference<>(holder.binding.statusContent)),
|
||||||
TextView.BufferType.SPANNABLE);
|
TextView.BufferType.SPANNABLE);
|
||||||
MastodonHelper.loadPPMastodon(holder.binding.avatar, status.account);
|
MastodonHelper.loadPPMastodon(holder.binding.avatar, status.account);
|
||||||
holder.binding.displayName.setText(
|
if (status.account != null) {
|
||||||
status.account.getSpanDisplayName(context,
|
holder.binding.displayName.setText(
|
||||||
new WeakReference<>(holder.binding.displayName)),
|
status.account.getSpanDisplayName(context,
|
||||||
TextView.BufferType.SPANNABLE);
|
new WeakReference<>(holder.binding.displayName)),
|
||||||
holder.binding.username.setText(String.format("@%s", status.account.acct));
|
TextView.BufferType.SPANNABLE);
|
||||||
|
holder.binding.username.setText(String.format("@%s", status.account.acct));
|
||||||
|
}
|
||||||
|
|
||||||
if (status.spoiler_text != null && !status.spoiler_text.trim().isEmpty()) {
|
if (status.spoiler_text != null && !status.spoiler_text.trim().isEmpty()) {
|
||||||
holder.binding.spoiler.setVisibility(View.VISIBLE);
|
holder.binding.spoiler.setVisibility(View.VISIBLE);
|
||||||
holder.binding.spoiler.setText(
|
holder.binding.spoiler.setText(
|
||||||
|
|
Loading…
Reference in New Issue