Skip to content

Commit

Permalink
Animation continued after unsuccessful "toPreviousStory" call
Browse files Browse the repository at this point in the history
  • Loading branch information
radovix authored Jan 31, 2024
1 parent df0aabf commit 4b5103c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( {

scrollTo( previousUserId.value );

} else {
return false;
}

} else {
Expand All @@ -225,6 +227,7 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( {

}

return true;
};

const show = ( id: string ) => {
Expand Down Expand Up @@ -342,7 +345,11 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( {

} else if ( ( pressInformation.value.x ) < WIDTH / 2 ) {

toPreviousStory();
const success = toPreviousStory();

if (!success) {
startAnimation(true);
}

} else {

Expand Down

0 comments on commit 4b5103c

Please sign in to comment.