Skip to content

Commit

Permalink
Merge pull request #48 from juliancwirko/master
Browse files Browse the repository at this point in the history
trying to fix #41
  • Loading branch information
calintamas authored Sep 5, 2020
2 parents 46f2eab + b0d3fd6 commit 2e0a59c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class Toast extends Component {
if (value < 0.65) {
Animated.spring(animation, {
toValue: -2,
speed: -vy,
speed: position === 'bottom' ? vy : -vy,
useNativeDriver: true
}).start(() => {
const { onHide } = this.state;
Expand Down Expand Up @@ -164,7 +164,7 @@ class Toast extends Component {
...getInitialState(this.props), // Reset layout
/*
Preserve the previously computed height (via onLayout).
If the height of the component corresponding to this `show` call is different,
If the height of the component corresponding to this `show` call is different,
onLayout will be called again and `height` state will adjust.
This fixes an issue where a succession of calls to components with custom heights (custom Toast types)
Expand Down

0 comments on commit 2e0a59c

Please sign in to comment.