TheWidlarzGroup / react-native-notificated

⚡️React Native toast notifications
https://thewidlarzgroup.github.io/react-native-notificated/
MIT License
387 stars 22 forks source link

[BUG] Toast container is jumping when swiping #276

Open vlanemcev opened 2 months ago

vlanemcev commented 2 months ago

Prerequisites Please answer the following questions for yourself before submitting an issue.

Describe the bug When I try to swipe toast in direction that I choose - the Toast come back in the initial position and start animation from it. Check attached video.

To Reproduce Here's my config that I use in the screen:

  useEffect(() => {
    notify("error", {
      params: {
        title: "Test error message",
      },
      config: {
        duration: 1500,
        animationConfig: MoveUp,
        notificationPosition: "top",
        gestureConfig: {
          direction: "y",
          activationDistances: 30,
        },
      },
    });
  }, [notify]);

Expected behavior Toast will not jump in initial position and continue it's animation from the end of gesture.

Screenshots

https://github.com/user-attachments/assets/d47ae93a-3111-456a-bb1b-e7bac1bc9e38

Smartphone:

PdoubleU commented 4 weeks ago

@vlanemcev thanks for opening the issue, this is something should be improved. Feel free to open PR with the fix ⚙️. I'd be happy to review and merge it ❤️