From 9f4f418aea16f38f9ce15e7f2bc21ecb172339f1 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Wed, 13 May 2020 15:05:43 -0300 Subject: [PATCH] [FIX] NewMessageView Press Item should open DM --- app/views/RoomsListView/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index 699bd3b9b97..d888f3cc080 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -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); } @@ -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}