mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 09:03:56 +02:00
Removed messaging style
This commit is contained in:
@@ -189,7 +189,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
private boolean date;
|
||||
private boolean threading;
|
||||
private boolean bubble;
|
||||
private boolean avatars;
|
||||
private boolean name_email;
|
||||
private boolean distinguish_contacts;
|
||||
@@ -251,10 +250,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
View.OnTouchListener,
|
||||
View.OnLayoutChangeListener,
|
||||
BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
private ImageView ivAvatarStart;
|
||||
private ViewCardOptional card;
|
||||
private View view;
|
||||
private ImageView ivAvatarEnd;
|
||||
|
||||
private View vwColor;
|
||||
private ImageButton ibExpander;
|
||||
@@ -368,10 +365,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
ViewHolder(final View itemView) {
|
||||
super(itemView);
|
||||
|
||||
ivAvatarStart = itemView.findViewById(R.id.ivAvatarStart);
|
||||
card = itemView.findViewById(R.id.card);
|
||||
view = itemView.findViewById(R.id.clItem);
|
||||
ivAvatarEnd = itemView.findViewById(R.id.ivAvatarEnd);
|
||||
|
||||
vwColor = itemView.findViewById(R.id.vwColor);
|
||||
ibExpander = itemView.findViewById(R.id.ibExpander);
|
||||
@@ -633,8 +628,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
}
|
||||
|
||||
private void clear() {
|
||||
ivAvatarStart.setVisibility(View.GONE);
|
||||
ivAvatarEnd.setVisibility(View.GONE);
|
||||
vwColor.setVisibility(View.GONE);
|
||||
ibExpander.setVisibility(View.GONE);
|
||||
ibFlagged.setVisibility(View.GONE);
|
||||
@@ -670,16 +663,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
Address[] addresses = (outgoing && viewType != ViewType.THREAD ? message.to : message.senders);
|
||||
boolean expanded = (viewType == ViewType.THREAD && properties.getValue("expanded", message.id));
|
||||
|
||||
if (viewType == ViewType.THREAD) {
|
||||
ivAvatarStart.setVisibility(outgoing && bubble ? View.INVISIBLE : View.GONE);
|
||||
ivAvatarEnd.setVisibility(outgoing || !bubble ? View.GONE : View.INVISIBLE);
|
||||
ivAvatar.setVisibility(bubble || !avatars ? View.GONE : View.INVISIBLE);
|
||||
} else {
|
||||
ivAvatarStart.setVisibility(View.GONE);
|
||||
ivAvatarEnd.setVisibility(View.GONE);
|
||||
ivAvatar.setVisibility(avatars ? View.INVISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
// Text size
|
||||
if (textSize != 0) {
|
||||
tvFrom.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * (message.unseen > 0 ? 1.1f : 1f));
|
||||
@@ -773,6 +756,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
else
|
||||
ibExpander.setVisibility(View.GONE);
|
||||
|
||||
// Photo
|
||||
ivAvatar.setVisibility(avatars ? View.INVISIBLE : View.GONE);
|
||||
|
||||
// Line 1
|
||||
tvFrom.setText(MessageHelper.formatAddresses(addresses, name_email, false));
|
||||
tvFrom.setPaintFlags(tvFrom.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
||||
@@ -1016,27 +1002,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
}
|
||||
|
||||
private void bindContactInfo(ContactInfo info, TupleMessageEx message) {
|
||||
if (bubble && viewType == ViewType.THREAD) {
|
||||
boolean outgoing = isOutgoing(message);
|
||||
if (outgoing) {
|
||||
if (info.hasPhoto())
|
||||
ivAvatarStart.setImageBitmap(info.getPhotoBitmap());
|
||||
else
|
||||
ivAvatarStart.setImageResource(R.drawable.baseline_person_24);
|
||||
ivAvatarStart.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (info.hasPhoto())
|
||||
ivAvatarEnd.setImageBitmap(info.getPhotoBitmap());
|
||||
else
|
||||
ivAvatarEnd.setImageResource(R.drawable.baseline_person_24);
|
||||
ivAvatarEnd.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
if (info.hasPhoto()) {
|
||||
ivAvatar.setImageBitmap(info.getPhotoBitmap());
|
||||
ivAvatar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
if (info.hasPhoto()) {
|
||||
ivAvatar.setImageBitmap(info.getPhotoBitmap());
|
||||
ivAvatar.setVisibility(View.VISIBLE);
|
||||
} else
|
||||
ivAvatar.setVisibility(View.GONE);
|
||||
|
||||
if (distinguish_contacts && info.isKnown())
|
||||
tvFrom.setPaintFlags(tvFrom.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
@@ -3506,7 +3476,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
this.date = prefs.getBoolean("date", true);
|
||||
this.threading = prefs.getBoolean("threading", true);
|
||||
this.bubble = prefs.getBoolean("bubble", false);
|
||||
this.avatars = (contacts && avatars) || generated;
|
||||
this.name_email = prefs.getBoolean("name_email", false);
|
||||
this.distinguish_contacts = prefs.getBoolean("distinguish_contacts", false);
|
||||
|
||||
Reference in New Issue
Block a user