FIx / Audio icon not shown after download
This commit is contained in:
parent
de53166193
commit
8b8855d2d5
|
@ -187,10 +187,18 @@ class MessageItemFactory @Inject constructor(
|
||||||
informationData: MessageInformationData,
|
informationData: MessageInformationData,
|
||||||
highlight: Boolean,
|
highlight: Boolean,
|
||||||
attributes: AbsMessageItem.Attributes): MessageFileItem? {
|
attributes: AbsMessageItem.Attributes): MessageFileItem? {
|
||||||
|
val fileUrl = messageContent.getFileUrl()?.let {
|
||||||
|
if (informationData.sentByMe && !informationData.sendState.isSent()) {
|
||||||
|
it
|
||||||
|
} else {
|
||||||
|
it.takeIf { it.startsWith("mxc://") }
|
||||||
|
}
|
||||||
|
} ?: ""
|
||||||
return MessageFileItem_()
|
return MessageFileItem_()
|
||||||
.attributes(attributes)
|
.attributes(attributes)
|
||||||
.izLocalFile(messageContent.getFileUrl().isLocalFile())
|
.izLocalFile(fileUrl.isLocalFile())
|
||||||
.mxcUrl(messageContent.getFileUrl() ?: "")
|
.izDownloaded(session.fileService().isFileInCache(fileUrl, messageContent.mimeType))
|
||||||
|
.mxcUrl(fileUrl)
|
||||||
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
||||||
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
||||||
.highlighted(highlight)
|
.highlighted(highlight)
|
||||||
|
|
Loading…
Reference in New Issue