|
|
@ -815,7 +815,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("WrongConstant")
|
|
|
|
@SuppressLint("WrongConstant")
|
|
|
|
private void bindTo(final TupleMessageEx message, int position) {
|
|
|
|
private void bindTo(final TupleMessageEx message) {
|
|
|
|
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);
|
|
|
@ -2631,7 +2631,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, getAdapterPosition());
|
|
|
|
bindTo(message);
|
|
|
|
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putLong("id", message.id);
|
|
|
|
args.putLong("id", message.id);
|
|
|
@ -3007,8 +3007,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
boolean expanded = !properties.getValue("expanded", message.id);
|
|
|
|
boolean expanded = !properties.getValue("expanded", message.id);
|
|
|
|
properties.setExpanded(message, expanded);
|
|
|
|
properties.setExpanded(message, expanded);
|
|
|
|
bindTo(message, getAdapterPosition());
|
|
|
|
bindTo(message);
|
|
|
|
properties.scrollTo(getAdapterPosition(), 0);
|
|
|
|
if (expanded)
|
|
|
|
|
|
|
|
properties.scrollTo(getAdapterPosition(), 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3617,7 +3618,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
properties.setExpanded(message, false);
|
|
|
|
properties.setExpanded(message, false);
|
|
|
|
message.ui_seen = args.getBoolean("seen");
|
|
|
|
message.ui_seen = args.getBoolean("seen");
|
|
|
|
message.unseen = (message.ui_seen ? 0 : message.count);
|
|
|
|
message.unseen = (message.ui_seen ? 0 : message.count);
|
|
|
|
bindTo(message, getAdapterPosition());
|
|
|
|
bindTo(message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -4882,10 +4883,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
holder.unwire();
|
|
|
|
holder.unwire();
|
|
|
|
holder.bindTo(message, position);
|
|
|
|
holder.bindTo(message);
|
|
|
|
holder.wire();
|
|
|
|
holder.wire();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void collapse(@NonNull ViewHolder holder, int position) {
|
|
|
|
|
|
|
|
TupleMessageEx message = getItemAtPosition(position);
|
|
|
|
|
|
|
|
if (message != null)
|
|
|
|
|
|
|
|
holder.clearExpanded(message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void focusBody(@NonNull ViewHolder holder, int position) {
|
|
|
|
public void focusBody(@NonNull ViewHolder holder, int position) {
|
|
|
|
if (holder.tvBody != null && holder.tvBody.getVisibility() == View.VISIBLE)
|
|
|
|
if (holder.tvBody != null && holder.tvBody.getVisibility() == View.VISIBLE)
|
|
|
|
holder.tvBody.requestFocus();
|
|
|
|
holder.tvBody.requestFocus();
|
|
|
|