From 7aa94e0a9e5b5a3b42c628a770455be0f66d78f2 Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Mon, 1 Aug 2022 13:42:10 -0300 Subject: [PATCH] [FIX] Fix display order render on RoomListView (#4392) --- app/views/RoomsListView/index.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/views/RoomsListView/index.tsx b/app/views/RoomsListView/index.tsx index 90f22b749..84062f715 100644 --- a/app/views/RoomsListView/index.tsx +++ b/app/views/RoomsListView/index.tsx @@ -530,21 +530,6 @@ class RoomsListView extends React.Component ({ rid: item.rid, alert: item.alert })); - } else { - /** - * Otherwise, we trigger re-render only when chats order changes - * RoomItem handles its own re-render - */ - chatsUpdate = data.map(item => item.rid); - } - const isOmnichannelAgent = user?.roles?.includes('livechat-agent'); if (isOmnichannelAgent) { const omnichannel = chats.filter(s => filterIsOmnichannel(s)); @@ -586,6 +571,8 @@ class RoomsListView extends React.Component item.rid); + this.internalSetState({ chats: tempChats, chatsUpdate,