Added sent time

pull/169/head
M66B 5 years ago
parent 5c2805ab0b
commit f293c1a0e9

@ -302,7 +302,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private TextView tvCcTitle; private TextView tvCcTitle;
private TextView tvBccTitle; private TextView tvBccTitle;
private TextView tvIdentityTitle; private TextView tvIdentityTitle;
private TextView tvTimeExTitle; private TextView tvSentTitle;
private TextView tvReceivedTitle;
private TextView tvSizeExTitle; private TextView tvSizeExTitle;
private TextView tvFromEx; private TextView tvFromEx;
@ -311,7 +312,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private TextView tvCc; private TextView tvCc;
private TextView tvBcc; private TextView tvBcc;
private TextView tvIdentity; private TextView tvIdentity;
private TextView tvTimeEx; private TextView tvSent;
private TextView tvReceived;
private TextView tvSizeEx; private TextView tvSizeEx;
private TextView tvSubjectEx; private TextView tvSubjectEx;
@ -446,7 +448,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvCcTitle = vsBody.findViewById(R.id.tvCcTitle); tvCcTitle = vsBody.findViewById(R.id.tvCcTitle);
tvBccTitle = vsBody.findViewById(R.id.tvBccTitle); tvBccTitle = vsBody.findViewById(R.id.tvBccTitle);
tvIdentityTitle = vsBody.findViewById(R.id.tvIdentityTitle); tvIdentityTitle = vsBody.findViewById(R.id.tvIdentityTitle);
tvTimeExTitle = vsBody.findViewById(R.id.tvTimeExTitle); tvSentTitle = vsBody.findViewById(R.id.tvSentTitle);
tvReceivedTitle = vsBody.findViewById(R.id.tvReceivedTitle);
tvSizeExTitle = vsBody.findViewById(R.id.tvSizeExTitle); tvSizeExTitle = vsBody.findViewById(R.id.tvSizeExTitle);
tvFromEx = vsBody.findViewById(R.id.tvFromEx); tvFromEx = vsBody.findViewById(R.id.tvFromEx);
@ -455,7 +458,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvCc = vsBody.findViewById(R.id.tvCc); tvCc = vsBody.findViewById(R.id.tvCc);
tvBcc = vsBody.findViewById(R.id.tvBcc); tvBcc = vsBody.findViewById(R.id.tvBcc);
tvIdentity = vsBody.findViewById(R.id.tvIdentity); tvIdentity = vsBody.findViewById(R.id.tvIdentity);
tvTimeEx = vsBody.findViewById(R.id.tvTimeEx); tvSent = vsBody.findViewById(R.id.tvSent);
tvReceived = vsBody.findViewById(R.id.tvReceived);
tvSizeEx = vsBody.findViewById(R.id.tvSizeEx); tvSizeEx = vsBody.findViewById(R.id.tvSizeEx);
tvSubjectEx = vsBody.findViewById(R.id.tvSubjectEx); tvSubjectEx = vsBody.findViewById(R.id.tvSubjectEx);
@ -969,7 +973,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvCcTitle.setVisibility(View.GONE); tvCcTitle.setVisibility(View.GONE);
tvBccTitle.setVisibility(View.GONE); tvBccTitle.setVisibility(View.GONE);
tvIdentityTitle.setVisibility(View.GONE); tvIdentityTitle.setVisibility(View.GONE);
tvTimeExTitle.setVisibility(View.GONE); tvSentTitle.setVisibility(View.GONE);
tvReceivedTitle.setVisibility(View.GONE);
tvSizeExTitle.setVisibility(View.GONE); tvSizeExTitle.setVisibility(View.GONE);
tvFromEx.setVisibility(View.GONE); tvFromEx.setVisibility(View.GONE);
@ -978,7 +983,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvCc.setVisibility(View.GONE); tvCc.setVisibility(View.GONE);
tvBcc.setVisibility(View.GONE); tvBcc.setVisibility(View.GONE);
tvIdentity.setVisibility(View.GONE); tvIdentity.setVisibility(View.GONE);
tvTimeEx.setVisibility(View.GONE); tvSent.setVisibility(View.GONE);
tvReceived.setVisibility(View.GONE);
tvSizeEx.setVisibility(View.GONE); tvSizeEx.setVisibility(View.GONE);
tvSubjectEx.setVisibility(View.GONE); tvSubjectEx.setVisibility(View.GONE);
tvFlags.setVisibility(View.GONE); tvFlags.setVisibility(View.GONE);
@ -1145,9 +1151,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvIdentity.setVisibility(show_addresses && via != null ? View.VISIBLE : View.GONE); tvIdentity.setVisibility(show_addresses && via != null ? View.VISIBLE : View.GONE);
tvIdentity.setText(via == null ? null : MessageHelper.formatAddresses(new Address[]{via})); tvIdentity.setText(via == null ? null : MessageHelper.formatAddresses(new Address[]{via}));
tvTimeExTitle.setVisibility(show_addresses ? View.VISIBLE : View.GONE); tvSentTitle.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvTimeEx.setVisibility(show_addresses ? View.VISIBLE : View.GONE); tvSent.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvTimeEx.setText(DTF.format(message.received)); tvSent.setText(message.sent == null ? null : DTF.format(message.sent));
tvReceivedTitle.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvReceived.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvReceived.setText(DTF.format(message.received));
if (!message.duplicate) if (!message.duplicate)
tvSizeEx.setAlpha(message.content ? 1.0f : Helper.LOW_LIGHT); tvSizeEx.setAlpha(message.content ? 1.0f : Helper.LOW_LIGHT);

@ -243,18 +243,18 @@
app:layout_constraintTop_toBottomOf="@id/tvBcc" /> app:layout_constraintTop_toBottomOf="@id/tvBcc" />
<TextView <TextView
android:id="@+id/tvTimeExTitle" android:id="@+id/tvSentTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:text="@string/title_received" android:text="@string/title_sent"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvIdentity" /> app:layout_constraintTop_toBottomOf="@id/tvIdentity" />
<TextView <TextView
android:id="@+id/tvTimeEx" android:id="@+id/tvSent"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
@ -266,6 +266,30 @@
app:layout_constraintStart_toEndOf="@+id/barrier_addresses" app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
app:layout_constraintTop_toBottomOf="@id/tvIdentity" /> app:layout_constraintTop_toBottomOf="@id/tvIdentity" />
<TextView
android:id="@+id/tvReceivedTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="@string/title_received"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSent" />
<TextView
android:id="@+id/tvReceived"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:text="12:34:56"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
app:layout_constraintTop_toBottomOf="@id/tvSent" />
<TextView <TextView
android:id="@+id/tvSizeExTitle" android:id="@+id/tvSizeExTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -275,7 +299,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" /> app:layout_constraintTop_toBottomOf="@id/tvReceived" />
<TextView <TextView
android:id="@+id/tvSizeEx" android:id="@+id/tvSizeEx"
@ -288,7 +312,7 @@
android:textIsSelectable="true" android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/barrier_addresses" app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" /> app:layout_constraintTop_toBottomOf="@id/tvReceived" />
<androidx.constraintlayout.widget.Barrier <androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier_addresses" android:id="@+id/barrier_addresses"
@ -299,7 +323,8 @@
tvFromExTitle,tvToTitle,tvReplyToTitle, tvFromExTitle,tvToTitle,tvReplyToTitle,
tvCcTitle,tvBccTitle, tvCcTitle,tvBccTitle,
tvIdentityTitle, tvIdentityTitle,
tvTimeExTitle,tvSizeExTitle" /> tvSentTitle,tvReceivedTitle,
tvSizeExTitle" />
<TextView <TextView
android:id="@+id/tvSubjectEx" android:id="@+id/tvSubjectEx"

@ -647,6 +647,7 @@
<string name="title_cc">CC:</string> <string name="title_cc">CC:</string>
<string name="title_bcc">BCC:</string> <string name="title_bcc">BCC:</string>
<string name="title_via_identity">Via:</string> <string name="title_via_identity">Via:</string>
<string name="title_sent">Sent:</string>
<string name="title_received">Received:</string> <string name="title_received">Received:</string>
<string name="title_size">Size:</string> <string name="title_size">Size:</string>
<string name="title_subject">Subject:</string> <string name="title_subject">Subject:</string>

Loading…
Cancel
Save