mirror of
https://codeberg.org/tom79/Fedilab
synced 2024-12-11 10:46:01 +01:00
some fixes
This commit is contained in:
parent
2db7b4b87c
commit
61ddd2a22d
@ -364,7 +364,7 @@ public class ProfileActivity extends BaseActivity {
|
||||
} else {
|
||||
Spannable textAccount = account.span_display_name != null ? account.span_display_name : new SpannableString(account.display_name);
|
||||
CustomEmoji.displayEmoji(ProfileActivity.this, account.emojis, textAccount, binding.accountDn, null, id -> {
|
||||
binding.accountDn.invalidate();
|
||||
binding.accountDn.setText(textAccount, TextView.BufferType.SPANNABLE);
|
||||
});
|
||||
binding.accountDn.setText(textAccount, TextView.BufferType.SPANNABLE);
|
||||
}
|
||||
@ -386,7 +386,7 @@ public class ProfileActivity extends BaseActivity {
|
||||
textNote = account.span_note != null ? account.span_note : new SpannableString(Html.fromHtml(account.note, Html.FROM_HTML_MODE_COMPACT));
|
||||
else
|
||||
textNote = account.span_note != null ? account.span_note : new SpannableString(Html.fromHtml(account.note));
|
||||
CustomEmoji.displayEmoji(ProfileActivity.this, account.emojis, textNote, binding.accountNote, null, id -> binding.accountNote.invalidate());
|
||||
CustomEmoji.displayEmoji(ProfileActivity.this, account.emojis, textNote, binding.accountNote, null, id -> binding.accountNote.setText(textNote, TextView.BufferType.SPANNABLE));
|
||||
binding.accountNote.setText(textNote, TextView.BufferType.SPANNABLE);
|
||||
binding.accountNote.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
|
@ -51,5 +51,5 @@ public class Announcement {
|
||||
|
||||
//Some extra spannable element - They will be filled automatically when fetching the status
|
||||
public transient Spannable span_content;
|
||||
public boolean emojiFetched = false;
|
||||
public transient boolean emojiFetched = false;
|
||||
}
|
||||
|
@ -197,13 +197,13 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||
holderStatus.bindingNotification.containerTransparent.setAlpha(.3f);
|
||||
if (getItemViewType(position) == TYPE_MENTION || getItemViewType(position) == TYPE_STATUS) {
|
||||
holderStatus.bindingNotification.status.actionButtons.setVisibility(View.VISIBLE);
|
||||
String title = "";
|
||||
Spannable title = new SpannableString("");
|
||||
if (getItemViewType(position) == TYPE_MENTION) {
|
||||
title = String.format(Locale.getDefault(), "%s %s", notification.account.display_name, context.getString(R.string.notif_mention));
|
||||
title = new SpannableString(String.format(Locale.getDefault(), "%s %s", notification.account.display_name, context.getString(R.string.notif_mention)));
|
||||
} else if (getItemViewType(position) == TYPE_STATUS) {
|
||||
title = String.format(Locale.getDefault(), "%s %s", notification.account.display_name, context.getString(R.string.notif_status));
|
||||
title = new SpannableString(String.format(Locale.getDefault(), "%s %s", notification.account.display_name, context.getString(R.string.notif_status)));
|
||||
}
|
||||
CustomEmoji.displayEmoji(context, notification.account.emojis, notification.account.span_display_name, holderStatus.binding.displayName, notification.id, id -> {
|
||||
CustomEmoji.displayEmoji(context, notification.account.emojis, title, holderStatus.binding.displayName, notification.id, id -> {
|
||||
if (!notification.account.emojiFetched) {
|
||||
notification.account.emojiFetched = true;
|
||||
holderStatus.binding.displayName.post(() -> notifyItemChanged(position));
|
||||
|
Loading…
Reference in New Issue
Block a user