Fix/improve transfer speed-related stuff
This commit is contained in:
parent
c5ed3be031
commit
47c53644e7
1
TODO.md
1
TODO.md
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
## Bug fixes
|
## 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
|
- Pausing uploads doesn't work well with matrix.org
|
||||||
- Quickly posting with another account leads to sync stop
|
- Quickly posting with another account leads to sync stop
|
||||||
- CPU usage
|
- CPU usage
|
||||||
|
|
|
@ -247,13 +247,13 @@ class MatrixClient(nio.AsyncClient):
|
||||||
|
|
||||||
def on_transfered(transfered: int) -> None:
|
def on_transfered(transfered: int) -> None:
|
||||||
upload_item.uploaded = transfered
|
upload_item.uploaded = transfered
|
||||||
|
|
||||||
|
def on_speed_changed(speed: float) -> None:
|
||||||
|
upload_item.speed = speed
|
||||||
upload_item.time_left = monitor.remaining_time
|
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_transfered = on_transfered
|
||||||
monitor.on_speed_change = on_speed_change
|
monitor.on_speed_changed = on_speed_changed
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url, mime, crypt_dict = await self.upload(
|
url, mime, crypt_dict = await self.upload(
|
||||||
|
|
|
@ -30,8 +30,6 @@ HColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Behavior on msLeft { HNumberAnimation { duration: 1000 } }
|
|
||||||
Behavior on uploaded { HNumberAnimation { duration: 1000 }}
|
|
||||||
Behavior on height { HNumberAnimation {} }
|
Behavior on height { HNumberAnimation {} }
|
||||||
|
|
||||||
HRowLayout {
|
HRowLayout {
|
||||||
|
@ -189,6 +187,7 @@ HColumnLayout {
|
||||||
Layout.maximumHeight:
|
Layout.maximumHeight:
|
||||||
status === "Error" && indeterminate ? 0 : -1
|
status === "Error" && indeterminate ? 0 : -1
|
||||||
|
|
||||||
|
Behavior on value { HNumberAnimation { duration: 1200 } }
|
||||||
Behavior on Layout.maximumHeight { HNumberAnimation {} }
|
Behavior on Layout.maximumHeight { HNumberAnimation {} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user