|
|
@ -145,8 +145,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
enum ViewType {UNIFIED, FOLDER, THREAD, SEARCH}
|
|
|
|
enum ViewType {UNIFIED, FOLDER, THREAD, SEARCH}
|
|
|
|
|
|
|
|
|
|
|
|
private static final float LOW_LIGHT = 0.6f;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static DateFormat df = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG);
|
|
|
|
private static DateFormat df = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG);
|
|
|
|
|
|
|
|
|
|
|
|
public class ViewHolder extends RecyclerView.ViewHolder implements
|
|
|
|
public class ViewHolder extends RecyclerView.ViewHolder implements
|
|
|
@ -394,24 +392,25 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
pbLoading.setVisibility(View.GONE);
|
|
|
|
pbLoading.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
|
|
|
|
itemView.setAlpha(message.uid == null && !EntityFolder.OUTBOX.equals(message.folderType) ? LOW_LIGHT : 1.0f);
|
|
|
|
itemView.setAlpha(message.uid == null && !EntityFolder.OUTBOX.equals(message.folderType)
|
|
|
|
|
|
|
|
? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
|
|
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
ivFlagged.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivFlagged.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivAvatar.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivAvatar.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvFrom.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvFrom.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvSize.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvSize.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvTime.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvTime.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivDraft.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivDraft.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivSnoozed.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivSnoozed.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivAnswered.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivAnswered.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivAttachments.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivAttachments.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvSubject.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvSubject.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvFolder.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvFolder.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvCount.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvCount.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
ivThread.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
ivThread.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvPreview.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvPreview.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
tvError.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
|
|
|
tvError.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!outgoing && (avatars || identicons)) {
|
|
|
|
if (!outgoing && (avatars || identicons)) {
|
|
|
@ -599,7 +598,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
|
|
tvSizeEx.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
|
|
|
|
tvSizeEx.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
|
|
|
|
if (!message.duplicate)
|
|
|
|
if (!message.duplicate)
|
|
|
|
tvSizeEx.setAlpha(message.content ? 1.0f : LOW_LIGHT);
|
|
|
|
tvSizeEx.setAlpha(message.content ? 1.0f : Helper.LOW_LIGHT);
|
|
|
|
tvSizeEx.setVisibility(message.size == null ? View.GONE : View.VISIBLE);
|
|
|
|
tvSizeEx.setVisibility(message.size == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
|
|
tvSubjectEx.setText(message.subject);
|
|
|
|
tvSubjectEx.setText(message.subject);
|
|
|
|