"Seen by" uses 12h time (Fixes #1378)

DateUtils.FORMAT_SHOW_TIME has to be used for i18n to be effective on DateUtils.getRelativeDateTimeString(), do not ask me why.
Also internal switching of language does not have effect on this method, you'll have to restart the application.
This commit is contained in:
Benoit Marty 2020-05-20 23:52:41 +02:00
parent ca37895619
commit d49fcb80fc
2 changed files with 7 additions and 5 deletions

View File

@ -12,6 +12,7 @@ Improvements 🙌:
Bugfix 🐛: Bugfix 🐛:
- After jump to unread, newer messages are never loaded (#1008) - After jump to unread, newer messages are never loaded (#1008)
- Fix issues with FontScale switch (#69, #645) - Fix issues with FontScale switch (#69, #645)
- "Seen by" uses 12h time (#1378)
Translations 🗣: Translations 🗣:
- -

View File

@ -45,11 +45,12 @@ class VectorDateFormatter @Inject constructor(private val context: Context,
if (time == null) { if (time == null) {
return "" return ""
} }
return DateUtils.getRelativeDateTimeString(context, return DateUtils.getRelativeDateTimeString(
time, context,
DateUtils.DAY_IN_MILLIS, time,
2 * DateUtils.DAY_IN_MILLIS, DateUtils.DAY_IN_MILLIS,
DateUtils.FORMAT_SHOW_WEEKDAY 2 * DateUtils.DAY_IN_MILLIS,
DateUtils.FORMAT_SHOW_WEEKDAY or DateUtils.FORMAT_SHOW_TIME
).toString() ).toString()
} }
} }