1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Time format, simplifications

This commit is contained in:
M66B 2019-01-07 18:26:45 +00:00
parent 89f8e9cd37
commit 50d0065ff2
2 changed files with 4 additions and 3 deletions

View file

@ -561,7 +561,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvCc.setText(MessageHelper.getFormattedAddresses(message.cc, true));
tvBcc.setText(MessageHelper.getFormattedAddresses(message.bcc, true));
tvTimeEx.setText(df.format(new Date(message.received)));
tvTimeEx.setText(df.format(message.received));
tvSizeEx.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
if (!message.duplicate)
@ -776,7 +776,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private void onShowSnoozed(TupleMessageEx message) {
if (message.ui_snoozed != null)
Toast.makeText(context, new Date(message.ui_snoozed).toString(), Toast.LENGTH_LONG).show();
Toast.makeText(context, SimpleDateFormat.getDateTimeInstance()
.format(message.ui_snoozed), Toast.LENGTH_LONG).show();
}
private void onToggleFlag(TupleMessageEx message) {

View file

@ -562,7 +562,7 @@ public class ServiceSynchronize extends LifecycleService {
sb.append("<strong>").append(MessageHelper.getFormattedAddresses(message.from, false)).append("</strong>");
if (!TextUtils.isEmpty(message.subject))
sb.append(": ").append(message.subject);
sb.append(" ").append(df.format(new Date(message.received)));
sb.append(" ").append(df.format(message.received));
sb.append("<br>");
}