diff --git a/app/containers/InAppNotification/NotifierComponent.js b/app/containers/InAppNotification/NotifierComponent.js index b69704359..6268cd098 100644 --- a/app/containers/InAppNotification/NotifierComponent.js +++ b/app/containers/InAppNotification/NotifierComponent.js @@ -76,7 +76,7 @@ const NotifierComponent = React.memo(({ notification, isMasterDetail }) => { const { title = name, avatar = name } = notification; const onPress = () => { - const { prid } = payload; + const { prid, _id } = payload; if (!rid) { return; } @@ -89,7 +89,7 @@ const NotifierComponent = React.memo(({ notification, isMasterDetail }) => { } else { Navigation.navigate('RoomsListView'); } - goRoom({ item, isMasterDetail }); + goRoom({ item, isMasterDetail, jumpToMessageId: _id }); hideNotification(); }; diff --git a/app/views/RoomView/List/index.js b/app/views/RoomView/List/index.js index 19a8ccb90..cbf02879b 100644 --- a/app/views/RoomView/List/index.js +++ b/app/views/RoomView/List/index.js @@ -269,7 +269,7 @@ class ListContainer extends React.Component { const { listRef } = this.props; const index = messages.findIndex(item => item.id === messageId); if (index > -1) { - listRef.current.getNode().scrollToIndex({ index, viewPosition: 0.5 }); + listRef.current.getNode().scrollToIndex({ index, viewPosition: 0.5, viewOffset: 100 }); await new Promise(res => setTimeout(res, 300)); if (!this.viewableItems.map(vi => vi.key).includes(messageId)) { if (!this.jumping) {