aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <allanwang@google.com>2020-01-17 11:58:38 -0800
committerAllan Wang <allanwang@google.com>2020-01-17 11:58:38 -0800
commit0ddc12ab95c8a750b2738ada06073830fd7cae8a (patch)
treeef419ae61b12892fe397dcf9a8b3f3b25e2fc04b /core/src/main/kotlin
parent71232a0547742d924d05f3bffd0ec6657e154b94 (diff)
parentd0963f367a23e6523af332e66afb1486cbf0f01b (diff)
downloadkau-0ddc12ab95c8a750b2738ada06073830fd7cae8a.tar.gz
kau-0ddc12ab95c8a750b2738ada06073830fd7cae8a.tar.bz2
kau-0ddc12ab95c8a750b2738ada06073830fd7cae8a.zip
Merge branch 'progress-animator' into misc
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/ui/ProgressAnimator.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/ui/ProgressAnimator.kt b/core/src/main/kotlin/ca/allanwang/kau/ui/ProgressAnimator.kt
index 486dc7f..04989d7 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/ui/ProgressAnimator.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/ui/ProgressAnimator.kt
@@ -147,7 +147,10 @@ class ProgressAnimator private constructor() : ValueAnimator() {
require(min < max) { "Range animator must have min < max; currently min=$min, max=$max" }
withDisposableAnimator {
when {
- it > max -> true
+ it > max -> {
+ action(end) // apply action in case frames were skipped
+ true
+ }
it < min -> false
else -> {
action(progress(start, end, it, min, max))