diff --git a/app/notifications/inApp/index.js b/app/notifications/inApp/index.js index 2a1b4fda..609aa0e6 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}