File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/com/infomaniak/mail/ui/main/folder Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import java.util.Date
33
33
enum class DateDisplay (@DrawableRes val icon : Int? , val formatDate : Context .(RealmInstant ) -> String ) {
34
34
Default (
35
35
icon = null ,
36
- formatDate = { date -> formatPastDate (date) }
36
+ formatDate = { date -> defaultFormatting (date) }
37
37
),
38
38
Scheduled (
39
39
icon = R .drawable.ic_scheduled_messages,
@@ -49,7 +49,7 @@ private fun Context.formatRelativeFutureDate(date: RealmInstant) = DateUtils.get
49
49
DateUtils .FORMAT_SHOW_YEAR or DateUtils .FORMAT_ABBREV_MONTH ,
50
50
)?.toString() ? : " "
51
51
52
- private fun Context.formatPastDate (date : RealmInstant ) = with (date.toDate()) {
52
+ private fun Context.defaultFormatting (date : RealmInstant ) = with (date.toDate()) {
53
53
when {
54
54
isInTheFuture() -> formatNumericalDayMonthYear()
55
55
isToday() -> format(FORMAT_DATE_HOUR_MINUTE )
You can’t perform that action at this time.
0 commit comments