Fix/improve transfer speed-related stuff

This commit is contained in:
miruka 2019-12-14 11:31:43 -04:00
parent c5ed3be031
commit 47c53644e7
3 changed files with 7 additions and 7 deletions

View File

@ -38,6 +38,7 @@
## Bug fixes
- Retry the initial profile retrieval if it fails (due to e.g. dead server)
- Pausing uploads doesn't work well with matrix.org
- Quickly posting with another account leads to sync stop
- CPU usage

View File

@ -247,13 +247,13 @@ class MatrixClient(nio.AsyncClient):
def on_transfered(transfered: int) -> None:
upload_item.uploaded = transfered
def on_speed_changed(speed: float) -> None:
upload_item.speed = speed
upload_item.time_left = monitor.remaining_time
def on_speed_change(speed: float) -> None:
upload_item.speed = speed
monitor.on_transfered = on_transfered
monitor.on_speed_change = on_speed_change
monitor.on_transfered = on_transfered
monitor.on_speed_changed = on_speed_changed
try:
url, mime, crypt_dict = await self.upload(

View File

@ -30,8 +30,6 @@ HColumnLayout {
}
Behavior on msLeft { HNumberAnimation { duration: 1000 } }
Behavior on uploaded { HNumberAnimation { duration: 1000 }}
Behavior on height { HNumberAnimation {} }
HRowLayout {
@ -189,6 +187,7 @@ HColumnLayout {
Layout.maximumHeight:
status === "Error" && indeterminate ? 0 : -1
Behavior on value { HNumberAnimation { duration: 1200 } }
Behavior on Layout.maximumHeight { HNumberAnimation {} }
}
}