robcalcroft / react-native-in-app-notification

:bell: Customisable in-app notification component for React Native
MIT License
269 stars 78 forks source link

Disable vibration not working on ios #51

Open larsandremoen opened 3 years ago

larsandremoen commented 3 years ago

Unable to disable the vibration with vibrate=false.

For me it looks like it's becuase this guard is always true due to prevProps.vibrate always being true.

Modifying the guard to the following seems to be working as intended: if (this.props.vibrate && this.props.isOpen && !prevProps.isOpen) {...}

robcalcroft commented 3 years ago

Hi @7arsandre good spot, happy to take a pull request if you have a fix to hand?

larsandremoen commented 3 years ago

@robcalcroft I will do a PR on this! 👌

larsandremoen commented 3 years ago

Pushed the PR: https://github.com/robcalcroft/react-native-in-app-notification/pull/52 @robcalcroft