diff --git a/.gitmodules b/.gitmodules index 3109278..7b1df16 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [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 diff --git a/qml/component/AudioBubble.qml b/qml/component/AudioBubble.qml index c5ec76b..3c4ed61 100644 --- a/qml/component/AudioBubble.qml +++ b/qml/component/AudioBubble.qml @@ -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() } } diff --git a/qml/component/FileBubble.qml b/qml/component/FileBubble.qml index aa3eff4..4ff77bd 100644 --- a/qml/component/FileBubble.qml +++ b/qml/component/FileBubble.qml @@ -20,7 +20,7 @@ AvatarContainer { maximumWidth: messageListView.width highlighted: !sentByMe timeLabelVisible: false - authorLabelVisible: messageRow.avatarVisible + authorLabelVisible: false displayText: "File: " + content.body }