forked from GitHub-Mirror/riotX-android
Room summary; handle encrypted events
This commit is contained in:
committed by
Benoit Marty
parent
e1b6f4bd74
commit
5e9ecfbcc0
@ -45,11 +45,11 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte
|
||||
val latestEvent = roomSummary.latestEvent
|
||||
if (latestEvent != null) {
|
||||
val date = latestEvent.root.localDateTime()
|
||||
val currentData = DateProvider.currentLocalDateTime()
|
||||
val isSameDay = date.toLocalDate() == currentData.toLocalDate()
|
||||
latestFormattedEvent = if (latestEvent.root.type == EventType.MESSAGE) {
|
||||
val currentDate = DateProvider.currentLocalDateTime()
|
||||
val isSameDay = date.toLocalDate() == currentDate.toLocalDate()
|
||||
latestFormattedEvent = if (latestEvent.root.getClearType() == EventType.MESSAGE) {
|
||||
val senderName = latestEvent.senderName() ?: latestEvent.root.senderId
|
||||
val content = latestEvent.root.content?.toModel<MessageContent>()
|
||||
val content = latestEvent.root.getClearContent()?.toModel<MessageContent>()
|
||||
val message = content?.body ?: ""
|
||||
if (roomSummary.isDirect.not() && senderName != null) {
|
||||
span {
|
||||
|
Reference in New Issue
Block a user