From 3e214dc26b55913a7b3d2f3dedcec5234b3d2a40 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 1 Dec 2019 11:24:20 -0400 Subject: [PATCH] Don't use Animators for ListView transitions They're buggy --- TODO.md | 1 + requirements.txt | 2 +- src/python/errors.py | 1 - src/qml/Base/HListView.qml | 17 ++++++----------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/TODO.md b/TODO.md index 5a304a0d..19ec9141 100644 --- a/TODO.md +++ b/TODO.md @@ -33,6 +33,7 @@ - Reducable room sidepane, swipe to show full-window - Fixes + - Quickly posting with another account leads to sync stop - CPU usage - `code` not colored in room subtitle - In the "Leave me" room, "join > Hi > left" aren't combined diff --git a/requirements.txt b/requirements.txt index 764ebe33..273cd1ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ aiofiles >= 0.4.0, < 0.5 appdirs >= 1.4.3, < 2 filetype >= 1.0.5, < 2 html_sanitizer >= 1.7.3, < 2 -lxml >= 4.4.1, < 5 +lxml >= 4.4.2, < 5 mistune >= 0.8.4, < 0.9 dataclasses >= 0.6, < 0.7; python_version < "3.7" pyfastcopy >= 1.0.3, < 2; python_version < "3.8" diff --git a/src/python/errors.py b/src/python/errors.py index de9eec03..d83e540c 100644 --- a/src/python/errors.py +++ b/src/python/errors.py @@ -1,5 +1,4 @@ from dataclasses import dataclass, field -from typing import Optional import nio diff --git a/src/qml/Base/HListView.qml b/src/qml/Base/HListView.qml index cce152a8..b2b02146 100644 --- a/src/qml/Base/HListView.qml +++ b/src/qml/Base/HListView.qml @@ -29,30 +29,25 @@ ListView { visible: listView.interactive || ! listView.enableFlicking } - // FIXME: HOpacityAnimator creates flickering - add: Transition { ParallelAnimation { - HNumberAnimation { property: "opacity"; from: 0; to: 1 } - HXAnimator { from: 100 } - HYAnimator { from: 100 } + HNumberAnimation { property: "opacity"; from: 0; to: 1 } + HNumberAnimation { properties: "x,y"; from: 100 } } } move: Transition { ParallelAnimation { // Ensure opacity goes to 1 if add/remove transition is interrupted - HNumberAnimation { property: "opacity"; to: 1 } - HXAnimator {} - HYAnimator {} + HNumberAnimation { property: "opacity"; to: 1 } + HNumberAnimation { properties: "x,y" } } } remove: Transition { ParallelAnimation { - HNumberAnimation { property: "opacity"; to: 0 } - HXAnimator { to: 100 } - HYAnimator { to: 100 } + HNumberAnimation { property: "opacity"; to: 0 } + HNumberAnimation { properties: "x,y"; to: 100 } } }