Commit 6752791f authored by Black Hat's avatar Black Hat 😎

Improve AudioBubble && fix flathub issue.

parent 6e79bf64
Pipeline #28112425 passed with stage
in 6 minutes and 49 seconds
[submodule "include/SortFilterProxyModel"]
path = include/SortFilterProxyModel
url = https://gitlab.com/b0/SortFilterProxyModel
url = https://gitlab.com/b0/SortFilterProxyModel.git
[submodule "include/libqmatrixclient"]
path = include/libqmatrixclient
url = https://github.com/QMatrixClient/libqmatrixclient
url = https://github.com/QMatrixClient/libqmatrixclient.git
......@@ -12,10 +12,7 @@ AvatarContainer {
id: messageRow
Audio {
id: audioPlayer
source: progressInfo.localPath
}
Audio { id: audioPlayer }
DownloadableContent {
id: downloadable
......@@ -29,7 +26,7 @@ AvatarContainer {
maximumWidth: messageListView.width
highlighted: !sentByMe
timeLabelVisible: false
authorLabelVisible: messageRow.avatarVisible
authorLabelVisible: false
displayText: content.info.duration / 1000 + '"'
......@@ -40,7 +37,7 @@ AvatarContainer {
onClicked: {
if (downloadable.downloaded)
audioPlayer.play()
play()
else
{
playOnFinished = true
......@@ -49,6 +46,11 @@ AvatarContainer {
}
}
}
onDownloadedChanged: downloaded && playOnFinished ? audioPlayer.play() : {}
onDownloadedChanged: downloaded && playOnFinished ? play() : {}
}
function play() {
audioPlayer.source = progressInfo.localPath
audioPlayer.play()
}
}
......@@ -20,7 +20,7 @@ AvatarContainer {
maximumWidth: messageListView.width
highlighted: !sentByMe
timeLabelVisible: false
authorLabelVisible: messageRow.avatarVisible
authorLabelVisible: false
displayText: "<b>File: </b>" + content.body
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment