Show relative snoozed time

This commit is contained in:
M66B 2019-08-09 18:42:36 +02:00
parent e94f07bba3
commit e09bd95cc6
2 changed files with 9 additions and 3 deletions

View File

@ -13,8 +13,8 @@ android {
applicationId "eu.faircode.email"
minSdkVersion 21
targetSdkVersion 29
versionCode 639
versionName "1.639"
versionCode 640
versionName "1.640"
archivesBaseName = "FairEmail-v$versionName"
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera

View File

@ -52,6 +52,7 @@ import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.format.DateUtils;
import android.text.method.ArrowKeyMovementMethod;
import android.text.method.LinkMovementMethod;
import android.text.style.DynamicDrawableSpan;
@ -1545,7 +1546,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
DateFormat D = new SimpleDateFormat("E");
Snackbar.make(
parentFragment.getView(),
D.format(message.ui_snoozed) + " " + DTF.format(message.ui_snoozed),
D.format(message.ui_snoozed) + " " + DTF.format(message.ui_snoozed) + " - " +
DateUtils.getRelativeTimeSpanString(
message.ui_snoozed,
System.currentTimeMillis(),
DateUtils.MINUTE_IN_MILLIS,
DateUtils.FORMAT_ABBREV_RELATIVE),
Snackbar.LENGTH_LONG).show();
}
}