|
|
@ -259,6 +259,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
BottomNavigationView.OnNavigationItemSelectedListener {
|
|
|
|
BottomNavigationView.OnNavigationItemSelectedListener {
|
|
|
|
private ViewCardOptional card;
|
|
|
|
private ViewCardOptional card;
|
|
|
|
private View view;
|
|
|
|
private View view;
|
|
|
|
|
|
|
|
private View header;
|
|
|
|
|
|
|
|
|
|
|
|
private View vwColor;
|
|
|
|
private View vwColor;
|
|
|
|
private ImageButton ibExpander;
|
|
|
|
private ImageButton ibExpander;
|
|
|
@ -382,6 +383,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
card = itemView.findViewById(R.id.card);
|
|
|
|
card = itemView.findViewById(R.id.card);
|
|
|
|
view = itemView.findViewById(R.id.clItem);
|
|
|
|
view = itemView.findViewById(R.id.clItem);
|
|
|
|
|
|
|
|
header = itemView.findViewById(R.id.inHeader);
|
|
|
|
|
|
|
|
|
|
|
|
vwColor = itemView.findViewById(R.id.vwColor);
|
|
|
|
vwColor = itemView.findViewById(R.id.vwColor);
|
|
|
|
ibExpander = itemView.findViewById(R.id.ibExpander);
|
|
|
|
ibExpander = itemView.findViewById(R.id.ibExpander);
|
|
|
@ -733,7 +735,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("WrongConstant")
|
|
|
|
@SuppressLint("WrongConstant")
|
|
|
|
private void bindTo(final TupleMessageEx message) {
|
|
|
|
private void bindTo(final TupleMessageEx message, int position) {
|
|
|
|
boolean inbox = EntityFolder.INBOX.equals(message.folderType);
|
|
|
|
boolean inbox = EntityFolder.INBOX.equals(message.folderType);
|
|
|
|
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
|
|
|
|
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
|
|
|
|
boolean outgoing = isOutgoing(message);
|
|
|
|
boolean outgoing = isOutgoing(message);
|
|
|
@ -903,6 +905,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
// Expand warning
|
|
|
|
// Expand warning
|
|
|
|
bindExpandWarning(message, expanded);
|
|
|
|
bindExpandWarning(message, expanded);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Accessibility
|
|
|
|
|
|
|
|
header.setContentDescription(context.getString(
|
|
|
|
|
|
|
|
R.string.title_accessibility_header,
|
|
|
|
|
|
|
|
position,
|
|
|
|
|
|
|
|
tvFrom.getText(),
|
|
|
|
|
|
|
|
tvTime.getText(),
|
|
|
|
|
|
|
|
tvSubject.getText(),
|
|
|
|
|
|
|
|
context.getString(message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen),
|
|
|
|
|
|
|
|
message.count - message.unflagged > 0 ? context.getString(R.string.title_accessibility_flagged) : ""
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
// Message text preview
|
|
|
|
// Message text preview
|
|
|
|
int textColor = (contrast ? textColorPrimary : textColorSecondary);
|
|
|
|
int textColor = (contrast ? textColorPrimary : textColorSecondary);
|
|
|
|
if (tvPreview.getTag() == null || (int) tvPreview.getTag() != textColor) {
|
|
|
|
if (tvPreview.getTag() == null || (int) tvPreview.getTag() != textColor) {
|
|
|
@ -2193,7 +2206,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
message.ui_seen = !message.ui_seen;
|
|
|
|
message.ui_seen = !message.ui_seen;
|
|
|
|
message.unseen = (message.ui_seen ? 0 : message.count);
|
|
|
|
message.unseen = (message.ui_seen ? 0 : message.count);
|
|
|
|
bindTo(message);
|
|
|
|
bindTo(message, getAdapterPosition());
|
|
|
|
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putLong("id", message.id);
|
|
|
|
args.putLong("id", message.id);
|
|
|
@ -4238,7 +4251,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
holder.unwire();
|
|
|
|
holder.unwire();
|
|
|
|
holder.bindTo(message);
|
|
|
|
holder.bindTo(message, position);
|
|
|
|
holder.wire();
|
|
|
|
holder.wire();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|