From 20604c4695db57fb1b13142fd19aef4a3815c8cd Mon Sep 17 00:00:00 2001 From: Youssef Muhamad Date: Tue, 7 Jul 2020 10:06:48 -0300 Subject: [PATCH] [FIX] Check for UI_Use_Real_Name when sorting rooms (#2230) Co-authored-by: Diego Mello --- app/views/RoomsListView/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index aa5038a46..9bf50c088 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -428,7 +428,7 @@ class RoomsListView extends React.Component { let tempChats = []; let chats = []; if (sortBy === 'alphabetical') { - chats = orderBy(data, ['name'], ['asc']); + chats = orderBy(data, [`${ this.useRealName ? 'fname' : 'name' }`], ['asc']); } else { chats = orderBy(data, ['roomUpdatedAt'], ['desc']); }