Skip to content

Commit

Permalink
[FIX] NewMessageView Press Item should open DM
Browse files Browse the repository at this point in the history
  • Loading branch information
djorkaeffalexandre committed May 13, 2020
1 parent 0009e7f commit 9f4f418
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/views/RoomsListView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,15 @@ class RoomsListView extends React.Component {
});
}

_onPressItem = async(item = {}) => {
onPressRoom = (item) => {
const { navigation } = this.props;
if (!navigation.isFocused()) {
return;
}
this._onPressItem(item);
}

_onPressItem = async(item = {}) => {
if (!item.search) {
return this.goRoom(item);
}
Expand Down Expand Up @@ -809,7 +813,7 @@ class RoomsListView extends React.Component {
baseUrl={server}
prid={item.prid}
showLastMessage={StoreLastMessage}
onPress={() => this._onPressItem(item)}
onPress={() => this.onPressRoom(item)}
testID={`rooms-list-view-item-${ item.name }`}
width={split ? MAX_SIDEBAR_WIDTH : width}
toggleFav={this.toggleFav}
Expand Down

0 comments on commit 9f4f418

Please sign in to comment.