From 57d13e989432b6420d33c4ad82a20570268363e7 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 26 May 2020 10:04:31 -0300 Subject: [PATCH] inapp notification --- app/notifications/inApp/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/notifications/inApp/index.js b/app/notifications/inApp/index.js index 3862846a0..73f8d7c17 100644 --- a/app/notifications/inApp/index.js +++ b/app/notifications/inApp/index.js @@ -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;