From 89209a954a1f23150f900b8705882b159d0cb6cc Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 19 Nov 2019 14:05:08 -0300 Subject: [PATCH] [FIX] In-app notification showing wrong content on channels (#1400) --- app/notifications/inApp/index.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/notifications/inApp/index.js b/app/notifications/inApp/index.js index 2a1b4fdad..609aa0e69 100644 --- a/app/notifications/inApp/index.js +++ b/app/notifications/inApp/index.js @@ -48,6 +48,9 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center' }, + inner: { + flex: 1 + }, avatar: { marginRight: 10 }, @@ -160,7 +163,7 @@ class NotificationBadge extends React.Component { if (!rid) { return; } - const name = type === 'p' ? payload.name : payload.sender.username; + const name = type === 'd' ? payload.sender.username : payload.name; await navigation.navigate('RoomsListView'); navigation.navigate('RoomView', { rid, name, t: type, prid @@ -174,7 +177,7 @@ class NotificationBadge extends React.Component { } = this.props; const { message, payload } = notification; const { type } = payload; - const name = type === 'p' ? payload.name : payload.sender.username; + const name = type === 'd' ? payload.sender.username : payload.name; let top = 0; if (isIOS) { @@ -186,8 +189,6 @@ class NotificationBadge extends React.Component { } } - const maxWidthMessage = window.width - 110; - const translateY = this.animatedValue.interpolate({ inputRange: [0, 1], outputRange: [-top - ROW_HEIGHT, top] @@ -202,9 +203,9 @@ class NotificationBadge extends React.Component { > <> - - {name} - {message} + + {name} + {message}