Remove "(You)" from the reactions details.
This reverts commit ed2b049ad4
.
This commit is contained in:
parent
c94e93b916
commit
83ea919434
2 changed files with 3 additions and 15 deletions
|
@ -1,6 +1,5 @@
|
||||||
package org.thoughtcrime.securesms.reactions;
|
package org.thoughtcrime.securesms.reactions;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -46,13 +45,13 @@ final class ReactionRecipientsAdapter extends RecyclerView.Adapter<ReactionRecip
|
||||||
return data.size();
|
return data.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
final static class ViewHolder extends RecyclerView.ViewHolder {
|
final class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private final AvatarImageView avatar;
|
private final AvatarImageView avatar;
|
||||||
private final TextView recipient;
|
private final TextView recipient;
|
||||||
private final TextView emoji;
|
private final TextView emoji;
|
||||||
|
|
||||||
private ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
avatar = itemView.findViewById(R.id.reactions_bottom_view_recipient_avatar);
|
avatar = itemView.findViewById(R.id.reactions_bottom_view_recipient_avatar);
|
||||||
|
@ -61,7 +60,7 @@ final class ReactionRecipientsAdapter extends RecyclerView.Adapter<ReactionRecip
|
||||||
}
|
}
|
||||||
|
|
||||||
void bind(@NonNull Reaction reaction) {
|
void bind(@NonNull Reaction reaction) {
|
||||||
this.recipient.setText(getReactionSenderDisplayName(itemView.getContext(), reaction.getSender()));
|
this.recipient.setText(reaction.getSender().getDisplayName(itemView.getContext()));
|
||||||
this.emoji.setText(reaction.getEmoji());
|
this.emoji.setText(reaction.getEmoji());
|
||||||
|
|
||||||
if (reaction.getSender().isLocalNumber()) {
|
if (reaction.getSender().isLocalNumber()) {
|
||||||
|
@ -71,16 +70,6 @@ final class ReactionRecipientsAdapter extends RecyclerView.Adapter<ReactionRecip
|
||||||
this.avatar.setAvatar(GlideApp.with(avatar), reaction.getSender(), false);
|
this.avatar.setAvatar(GlideApp.with(avatar), reaction.getSender(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NonNull String getReactionSenderDisplayName(@NonNull Context context, @NonNull Recipient sender) {
|
|
||||||
String displayName = sender.getDisplayName(context);
|
|
||||||
|
|
||||||
if (sender.isLocalNumber()) {
|
|
||||||
return context.getString(R.string.ReactionsBottomSheetDialogFragment_you, displayName);
|
|
||||||
} else {
|
|
||||||
return displayName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -669,7 +669,6 @@
|
||||||
|
|
||||||
<!-- ReactionsBottomSheetDialogFragment -->
|
<!-- ReactionsBottomSheetDialogFragment -->
|
||||||
<string name="ReactionsBottomSheetDialogFragment_all">All %1$d</string>
|
<string name="ReactionsBottomSheetDialogFragment_all">All %1$d</string>
|
||||||
<string name="ReactionsBottomSheetDialogFragment_you">%1$s (You)</string>
|
|
||||||
|
|
||||||
<!-- ReactionsConversationView -->
|
<!-- ReactionsConversationView -->
|
||||||
<string name="ReactionsConversationView_plus">+%1$d</string>
|
<string name="ReactionsConversationView_plus">+%1$d</string>
|
||||||
|
|
Loading…
Add table
Reference in a new issue