diff --git a/TODO.md b/TODO.md index 96e7c027..6e7d8f43 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index f818f9f1..6363e0c1 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -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( diff --git a/src/qml/Chat/FileTransfer/Transfer.qml b/src/qml/Chat/FileTransfer/Transfer.qml index 329ec12d..44192d7c 100644 --- a/src/qml/Chat/FileTransfer/Transfer.qml +++ b/src/qml/Chat/FileTransfer/Transfer.qml @@ -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 {} } } }