Uses MatriqueRoom inherited from QMatrixClient::Room and rewrite related

objects.
This commit is contained in:
Black Hat
2018-08-18 16:02:47 +08:00
parent 6640b172d5
commit 3a7f182c52
16 changed files with 202 additions and 177 deletions

View File

@@ -12,8 +12,6 @@ AvatarContainer {
id: messageRow
Audio { id: audioPlayer }
DownloadableContent {
id: downloadable
@@ -37,7 +35,7 @@ AvatarContainer {
onClicked: {
if (downloadable.downloaded)
play()
matriqueController.playAudio(progressInfo.localPath)
else
{
playOnFinished = true
@@ -46,11 +44,7 @@ AvatarContainer {
}
}
}
onDownloadedChanged: downloaded && playOnFinished ? play() : {}
onDownloadedChanged: downloaded && playOnFinished ? matriqueController.playAudio(progressInfo.localPath) : {}
}
function play() {
audioPlayer.source = progressInfo.localPath
audioPlayer.play()
}
}

View File

@@ -18,7 +18,7 @@ Item {
onDownloadedChanged: downloaded && openOnFinished ? openSavedFile() : {}
function saveFileAs() {
matriqueController.saveFileAs(currentRoom, eventId)
currentRoom.saveFileAs(eventId)
}
function downloadAndOpen()