Progress bar for video downloads
This commit is contained in:
parent
d994f8f102
commit
fa470f73ba
2 changed files with 69 additions and 49 deletions
|
@ -127,6 +127,10 @@ Item {
|
|||
videoComponentLoader.active = true;
|
||||
}
|
||||
}
|
||||
if (fileId === videoFileId) {
|
||||
downloadingProgressBar.maximumValue = fileInformation.size;
|
||||
downloadingProgressBar.value = fileInformation.local.downloaded_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,12 +158,17 @@ Item {
|
|||
visible: playButton.visible
|
||||
}
|
||||
|
||||
Row {
|
||||
Column {
|
||||
width: parent.width
|
||||
height: downloadingProgressBar.height + videoControlRow.height
|
||||
anchors.centerIn: parent
|
||||
|
||||
Row {
|
||||
id: videoControlRow
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
Item {
|
||||
height: parent.height
|
||||
width: videoMessageComponent.fullscreen ? parent.width : ( parent.width / 2 )
|
||||
height: Theme.iconSizeLarge
|
||||
Image {
|
||||
id: playButton
|
||||
anchors.centerIn: parent
|
||||
|
@ -186,8 +195,8 @@ Item {
|
|||
}
|
||||
Item {
|
||||
id: fullscreenItem
|
||||
height: parent.height
|
||||
width: parent.width / 2
|
||||
height: Theme.iconSizeLarge
|
||||
visible: !videoMessageComponent.fullscreen
|
||||
IconButton {
|
||||
id: fullscreenButton
|
||||
|
@ -209,6 +218,15 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
ProgressBar {
|
||||
id: downloadingProgressBar
|
||||
minimumValue: 0
|
||||
maximumValue: 100
|
||||
value: 0
|
||||
visible: videoDownloadBusyIndicator.visible
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: videoErrorShade
|
||||
|
@ -246,7 +264,7 @@ Item {
|
|||
id: videoComponentLoader
|
||||
active: false
|
||||
width: parent.width
|
||||
height: Functions.getVideoHeight(parent.width, videoData)
|
||||
height: ( rawMessage.content['@type'] === "messageVideoNote" ) ? width : Functions.getVideoHeight(parent.width, videoData)
|
||||
sourceComponent: videoComponent
|
||||
}
|
||||
|
||||
|
|
|
@ -263,9 +263,11 @@ Page {
|
|||
}
|
||||
onFileUpdated: {
|
||||
uploadStatusRow.visible = fileInformation.remote.is_uploading_active;
|
||||
if (uploadStatusRow.visible) {
|
||||
uploadingProgressBar.maximumValue = fileInformation.size;
|
||||
uploadingProgressBar.value = fileInformation.remote.uploaded_size;
|
||||
}
|
||||
}
|
||||
onEmojiSearchSuccessful: {
|
||||
chatPage.emojiProposals = result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue