Skip to content

Commit

Permalink
Merge branch 'main' into @mstach60161/fix-android-web-sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
mstach60161 committed May 30, 2023
2 parents db43327 + 548581a commit 43a92d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/reanimated2/animation/spring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function withSpring(
animation.omega0 = previousAnimation?.omega0 || 0;
animation.omega1 = previousAnimation?.omega1 || 0;
} else {
if (duration) {
if (config.useDuration) {
const acutalDuration = triggeredTwice
? // If animation is triggered twice we want to continue the previous animation
// so we need to include the time that already elapsed
Expand All @@ -168,7 +168,8 @@ export function withSpring(
animation.omega1 = omega1;
}

animation.lastTimestamp = now;
animation.lastTimestamp = previousAnimation?.lastTimestamp || now;

animation.startTimestamp = triggeredTwice
? previousAnimation?.startTimestamp || now
: now;
Expand Down

0 comments on commit 43a92d3

Please sign in to comment.