mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Use a different date format when device is inactive
This commit is contained in:
parent
5791a4d3cd
commit
fbff8d6408
2 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,7 @@ enum class DateFormatKind {
|
|||
// Will show hour or date relative (9:30am or yesterday or Sep 7 or 09/07/2020)
|
||||
ROOM_LIST,
|
||||
|
||||
// Will show full date (Sep 7 2020)
|
||||
// Will show full date (Sep 7, 2020)
|
||||
TIMELINE_DAY_DIVIDER,
|
||||
|
||||
// Will show full date and time (Mon, Sep 7 2020, 9:30am)
|
||||
|
|
|
@ -43,7 +43,8 @@ class OtherSessionsController @Inject constructor(
|
|||
}
|
||||
} else {
|
||||
data.take(NUMBER_OF_OTHER_DEVICES_TO_RENDER).forEach { device ->
|
||||
val formattedLastActivityDate = host.dateFormatter.format(device.deviceInfo.lastSeenTs, DateFormatKind.DEFAULT_DATE_AND_TIME)
|
||||
val dateFormatKind = if (device.isInactive) DateFormatKind.TIMELINE_DAY_DIVIDER else DateFormatKind.DEFAULT_DATE_AND_TIME
|
||||
val formattedLastActivityDate = host.dateFormatter.format(device.deviceInfo.lastSeenTs, dateFormatKind)
|
||||
val description = if (device.isInactive) {
|
||||
stringProvider.getQuantityString(
|
||||
R.plurals.device_manager_other_sessions_description_inactive,
|
||||
|
|
Loading…
Reference in a new issue