Auto identify file type as m.image.
This commit is contained in:
@@ -20,7 +20,7 @@ AvatarContainer {
|
||||
|
||||
Image {
|
||||
id: messageImage
|
||||
source: "image://mxc/" + content.url
|
||||
source: "image://mxc/" + (content.thumbnail_url ? content.thumbnail_url : content.url)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -150,12 +150,12 @@ Item {
|
||||
folder: shortcuts.home
|
||||
selectMultiple: false
|
||||
onAccepted: {
|
||||
currentRoom.uploadFile(fileDialog.fileUrl, fileDialog.fileUrl)
|
||||
currentRoom.uploadFile(fileUrl, fileUrl, matriqueController.getMIME(fileUrl))
|
||||
var fileTransferProgressCallback = function(id, sent, total) {
|
||||
if (id == fileDialog.fileUrl) { inputField.progress = sent / total }
|
||||
if (id == fileUrl) { inputField.progress = sent / total }
|
||||
}
|
||||
var completedCallback = function(id, localFile, mxcUrl) {
|
||||
if (id == fileDialog.fileUrl) {
|
||||
if (id == fileUrl) {
|
||||
matriqueController.postFile(currentRoom, localFile, mxcUrl)
|
||||
inputField.progress = 0
|
||||
currentRoom.fileTransferCompleted.disconnect(fileTransferProgressCallback)
|
||||
|
||||
Reference in New Issue
Block a user