|
|
|
@ -325,6 +325,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
pbLoading = itemView.findViewById(R.id.pbLoading);
|
|
|
|
|
vwRipple = itemView.findViewById(R.id.vwRipple);
|
|
|
|
|
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
|
ConstraintLayout inAttachments = itemView.findViewById(R.id.inAttachments);
|
|
|
|
|
ConstraintLayout inAttachmentsAlt = itemView.findViewById(R.id.inAttachmentsAlt);
|
|
|
|
|
inAttachments.setVisibility(attachments_alt ? View.GONE : View.VISIBLE);
|
|
|
|
@ -417,6 +418,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
grpAttachments = attachments.findViewById(R.id.grpAttachments);
|
|
|
|
|
grpImages = itemView.findViewById(R.id.grpImages);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rect getItemRect() {
|
|
|
|
|
return new Rect(
|
|
|
|
@ -444,6 +446,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ivSnoozed.setOnClickListener(this);
|
|
|
|
|
ivFlagged.setOnClickListener(this);
|
|
|
|
|
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
|
ivExpanderAddress.setOnClickListener(this);
|
|
|
|
|
ibSearchContact.setOnClickListener(this);
|
|
|
|
|
ibNotifyContact.setOnClickListener(this);
|
|
|
|
@ -462,6 +465,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
bnvActions.setOnNavigationItemSelectedListener(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void unwire() {
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
@ -473,6 +477,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ivSnoozed.setOnClickListener(null);
|
|
|
|
|
ivFlagged.setOnClickListener(null);
|
|
|
|
|
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
|
ivExpanderAddress.setOnClickListener(null);
|
|
|
|
|
ibSearchContact.setOnClickListener(null);
|
|
|
|
|
ibNotifyContact.setOnClickListener(null);
|
|
|
|
@ -491,6 +496,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
bnvActions.setOnNavigationItemSelectedListener(null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void clear() {
|
|
|
|
|
vwColor.setVisibility(View.GONE);
|
|
|
|
@ -531,6 +537,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
tvFrom.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * (message.unseen > 0 ? 1.1f : 1f));
|
|
|
|
|
tvSubject.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
|
|
|
|
tvPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
|
tvBody.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
|
|
|
|
|
|
|
|
|
|
int px = Math.round(TypedValue.applyDimension(
|
|
|
|
@ -751,8 +758,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
properties.setBody(message.id, null);
|
|
|
|
|
properties.setHtml(message.id, null);
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
clearExpanded();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void clearExpanded() {
|
|
|
|
@ -3536,7 +3542,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getItemViewType(int position) {
|
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
|
return (compact ? R.layout.item_message_compact : R.layout.item_message_normal);
|
|
|
|
|
else
|
|
|
|
|
return (compact ? R.layout.include_message_compact : R.layout.include_message_normal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|