mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
RoomSummary / Use encrypted message screen
This commit is contained in:
parent
e4c52484b1
commit
25bc5001f9
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,10 @@ class RoomSummaryItemFactory @Inject constructor(private val noticeEventFormatte
|
|||
val date = latestEvent.root.localDateTime()
|
||||
val currentDate = DateProvider.currentLocalDateTime()
|
||||
val isSameDay = date.toLocalDate() == currentDate.toLocalDate()
|
||||
latestFormattedEvent = if (latestEvent.root.getClearType() == EventType.MESSAGE) {
|
||||
latestFormattedEvent = if (latestEvent.root.isEncrypted()
|
||||
&& latestEvent.root.mxDecryptionResult == null) {
|
||||
stringProvider.getString(R.string.encrypted_message)
|
||||
} else if (latestEvent.root.getClearType() == EventType.MESSAGE) {
|
||||
val senderName = latestEvent.senderName() ?: latestEvent.root.senderId
|
||||
val content = latestEvent.root.getClearContent()?.toModel<MessageContent>()
|
||||
val message = content?.body ?: ""
|
||||
|
|
Loading…
Reference in a new issue