forked from GitHub-Mirror/riotX-android
add getFileUrl extension
This commit is contained in:
@ -452,7 +452,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
||||
FileService.DownloadMode.TO_EXPORT,
|
||||
action.eventId,
|
||||
action.messageFileContent.getFileName(),
|
||||
action.messageFileContent.encryptedFileInfo?.url ?: action.messageFileContent.url,
|
||||
action.messageFileContent.getSafeUrl(),
|
||||
action.messageFileContent.encryptedFileInfo?.toElementToDecrypt(),
|
||||
object : MatrixCallback<File> {
|
||||
override fun onSuccess(data: File) {
|
||||
|
@ -185,7 +185,7 @@ class MessageItemFactory @Inject constructor(
|
||||
val (maxWidth, maxHeight) = timelineMediaSizeProvider.getMaxSize()
|
||||
val data = ImageContentRenderer.Data(
|
||||
filename = messageContent.body,
|
||||
url = messageContent.encryptedFileInfo?.url ?: messageContent.url,
|
||||
url = messageContent.getFileUrl(),
|
||||
elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(),
|
||||
height = messageContent.info?.height,
|
||||
maxHeight = maxHeight,
|
||||
@ -238,7 +238,7 @@ class MessageItemFactory @Inject constructor(
|
||||
val videoData = VideoContentRenderer.Data(
|
||||
eventId = informationData.eventId,
|
||||
filename = messageContent.body,
|
||||
url = messageContent.encryptedFileInfo?.url ?: messageContent.url,
|
||||
url = messageContent.getFileUrl(),
|
||||
elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(),
|
||||
thumbnailMediaData = thumbnailData
|
||||
)
|
||||
|
Reference in New Issue
Block a user