inapp notification

This commit is contained in:
Diego Mello 2020-05-26 10:04:31 -03:00
parent 1ec094ce72
commit 57d13e9894
1 changed files with 3 additions and 2 deletions

View File

@ -72,6 +72,7 @@ const styles = StyleSheet.create({
class NotificationBadge extends React.Component {
static propTypes = {
navigation: PropTypes.object,
route: PropTypes.object,
baseUrl: PropTypes.string,
user: PropTypes.object,
notification: PropTypes.object,
@ -103,8 +104,8 @@ class NotificationBadge extends React.Component {
}
componentDidUpdate() {
const { notification: { payload }, navigation } = this.props;
const navState = this.getNavState(navigation.state);
const { notification: { payload }, route } = this.props;
const navState = this.getNavState(route.state);
if (payload.rid) {
if (navState && navState.routeName === 'RoomView' && navState.params && navState.params.rid === payload.rid) {
return;