Show the date on a room when the last message is older than today. (#484)

* Format the last message date correctly.
* Update room cell layout - fixes an issue where the longer the date got the smaller the last message width was.
This commit is contained in:
Doug
2023-01-24 11:02:51 +00:00
committed by GitHub
parent 7e1593d43d
commit b8e2d6f823
8 changed files with 197 additions and 69 deletions
@@ -261,7 +261,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
}
if let lastMessageTimestamp = details.lastMessageTimestamp {
room.timestamp = lastMessageTimestamp.formatted(date: .omitted, time: .shortened)
room.timestamp = lastMessageTimestamp.formattedMinimal()
}
roomsForIdentifiers[details.id] = room