mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Fix note to self message detail text.
This commit is contained in:
committed by
Greyson Parrelli
parent
5f31f5966c
commit
cd03da54d5
@@ -40,9 +40,15 @@ public class FromTextView extends SimpleEmojiTextView {
|
||||
}
|
||||
|
||||
public void setText(Recipient recipient, @Nullable CharSequence fromString, @Nullable CharSequence suffix, boolean asThread) {
|
||||
setText(recipient, fromString, suffix, asThread, false);
|
||||
}
|
||||
|
||||
public void setText(Recipient recipient, @Nullable CharSequence fromString, @Nullable CharSequence suffix, boolean asThread, boolean showSelfAsYou) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
|
||||
if (asThread && recipient.isSelf()) {
|
||||
if (asThread && recipient.isSelf() && showSelfAsYou) {
|
||||
builder.append(getContext().getString(R.string.Recipient_you));
|
||||
} else if (asThread && recipient.isSelf()) {
|
||||
builder.append(getContext().getString(R.string.note_to_self));
|
||||
} else {
|
||||
builder.append(fromString);
|
||||
|
||||
@@ -41,7 +41,7 @@ final class RecipientViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
void bind(RecipientDeliveryStatus data) {
|
||||
unidentifiedDeliveryIcon.setVisibility(TextSecurePreferences.isShowUnidentifiedDeliveryIndicatorsEnabled(itemView.getContext()) && data.isUnidentified() ? View.VISIBLE : View.GONE);
|
||||
fromView.setText(data.getRecipient());
|
||||
fromView.setText(data.getRecipient(), data.getRecipient().getDisplayName(itemView.getContext()), null, true, true);
|
||||
avatar.setRecipient(data.getRecipient());
|
||||
badge.setBadgeFromRecipient(data.getRecipient());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user